0

When working with MySql, is it better practice to use the DATE,DATETIME,TIMESTAMP datatypes for storing date and time or a BIGINT datatype with an epoch time stamp?

What advantages do each have and what are the performance differences?

1
  • have you looked up any performance stats or done any research? If so what is your current understanding so we can help with any holes in your understanding.
    – Jon Taylor
    Oct 9, 2012 at 19:47

1 Answer 1

5

Use date if you only need the date.
Use datetime if you need date and time.
Use timestamp if you need to version your records.
Use epoch time if you are working with that format and don't need dates before 1970.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.