Home > database >  Time format
Time format

Time:09-26

Each big: mysql innodb engine: under the same conditions (index), the timestamp (1543388624) and the split second 15:03:44 (2018-11-28) : what kind of format query quickly

CodePudding user response:

https://dev.mysql.com/doc/refman/8.0/en/datetime.html
11.3.1 The DATE and DATETIME, and TIMESTAMP Types
The DATE and DATETIME, and TIMESTAMP types are related. This section describes their characteristics, how they are similar, and how they differ. MySQL recognizes The DATE and DATETIME, and TIMESTAMP values in several formats, described in section 9.1.3, "is The DATE and Time Literals". For The DATE and DATETIME range descriptions, "supported" means that over The earlier values took The work, there is no guarantee.

The DATE type is 2 for values with a DATE part but no time part. The MySQL retrieves and displays The DATE values in '- DD YYYY - MM format. The supported range is' 1000-01-01' to '9999-12-31'.

The DATETIME type is 2 for values that contain both The date and time with parts. The MySQL retrieves and displays a DATETIME values in 'MM - DD YYYY - HH: MM: SS' format. The supported range is' 1000-01-01 00:00:00 'to' The 9999-12-31 23:59:59.

The TIMESTAMP data type is 2 for values that contain both The date and time with parts. The TIMESTAMP from a range of '1970-01-01 00:00:01 UTC to' The 2038-01-19 03:14:07 UTC.

A DATETIME or TIMESTAMP value can include a trailing fractional seconds part in up to microseconds (6 digits) precision. In particular, any fractional part in a value inserted into a DATETIME or TIMESTAMP column is stored rather than discarded. With the fractional part included, the format for these values is 'YYYY-MM-DD HH:MM:SS[.fraction]', the range for DATETIME values is '1000-01-01 00:00:00.000000' to '9999-12-31 23:59:59.999999', and the range for TIMESTAMP values is '1970-01-01 00:00:01.000000' to '2038-01-19 03:14:07.999999'. The fractional part should always be separated from the rest of the time by a decimal point; No other fractional seconds delimiter is recognized. For information about fractional seconds support in MySQL, see Section 11.3.6, "fractional seconds in Time Values".


In general, the smaller footprint, the unit memory can hold the more records, its efficiency is higher,
The field, so is the timestamp

Timestamp scope is limited, however, is also a 20 years of development of things, don't you?

  • Related