During MySQL query time period, it will be more efficient to select INT, or will it be more efficient to select DateTime? To solve this problem, we will perform a test to see whether INT or DateTime should be used in the MySQL query
Int
(1). 4 byte storage, the length of the int is 4 bytes, the storage space is less than datatime, the int index storage space is also relatively small, the sorting and the query efficiency is relatively higher a little(2) The readability is
usually storage time with datetime type, and now many systems also use int storage time, what difference do they have? Individuals prefer to use int this is good for date calculations, so let's look at the kind of things that would be better. int(1).
This article describes how to query logs and slow query logs in MySQL. It also describes how to use the Mysqldumpslow log analysis tool that comes with MySQL. For more information, see
I. query logs
Query all the queries in MySQL by using "-- log [=
How do I represent the current time in MySQL?In fact, the expression is still quite a lot of, summarized as follows:Current_timestampCurrent_timestamp ()Now ()LocalTimeLocalTime ()LocaltimestampLocaltimestamp ()Ii. Comparison of Timestamp and
A basic tutorial on querying logs and slow query logs in MySQL,
I. query logs
Query all the queries in MySQL by using "-- log [= file_name. Because all the queries, including all the select statements, are recorded, and the size is relatively large,
Some time ago, the project involved the conversion between MySQL and MSSQL data types. Recently, I was studying Sina Weibo's API, which involved the conversion of GMT time types with time zones, this is a special record for future query.
I.
Comparison of query in datetime format in MySQL time period-error-prone solution bitsCN.com
Comparison of query in datetime format in MySQL time period-easy to make mistakesQuery in datetime format in MySQL time period-prone to mistakes1. query all
Introduction to timestamp basic knowledge
Variant of the timestamp1,timestamp DEFAULT current_timestamp on UPDATE current_timestamp refreshes this data column when new records are created and existing records are modified
2,timestamp default
Mysql datetime query exception troubleshooting, mysqldatetime Query
An error occurred while querying mysql datetime.
Exception: Value '2017-00-00 00:00:00 'can not be represented as java. SQL. Timestamp (0000 11:38:40)
Description: non-null
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.