Time type selection for mysql

  • 2020-05-24 06:22:18
  • OfStack

Intertype: use the TIMESTAMP type whenever possible, because it requires only one and a half of the storage space of the DATETIME type. For data types that only need to be accurate to a given day, it is recommended to use the DATE type because it requires only 3 bytes of storage space, which is less than TIMESTAMP. It is not recommended to store an unix timestamp value through an INT type class, as this is too unintuitive, unnecessarily cumbersome to maintain, and provides no benefit at the same time.

Related articles: