since in mysql datetime field is represented as string (i’m not sure how it works internally), wouldn’t be from performance point of view faster to store date as unix timestamp? I don’t need to use any mysql native date functions, i’m going for performance of sorting and selecting data.
if there was an index for that column, would be difference between int and datetime?
Thank you
Timestamp needs 4 bytes while datetime needs 8 bytes per record. It means smaller indexes and better performance but not in each case:
How much faster is timestamp than datetime column in MySQL?