MySQL SELECT in a large table is faster with indexed INT or indexed TIMESTAMP

I want to create a MyISAM log table with Unix timestamp values. I will have different SELECT every time I use the date from to to, and the table will grow quite large.

I don’t know what would be the fastest between indexed INT or indexed TIMESTAMP (they have the same storage space that I consider).

I already tested Stackoverflow, but the answers are somewhat vague: from new members or they say one or the other.

+4
source share
1 answer

It should not matter. Timestamps are represented internally as integers, so comparing and indexing them will be essentially the same.

+8
source

Source: https://habr.com/ru/post/1492803/


All Articles