user2608458
user2608458

Reputation: 83

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

I want to create a MyISAM log table with Unix timestamp values. I will have various SELECT statements every once in while using a "from" date to "to" date and the table will grow quite large.

I don't know which would be the fastest between an Indexed INT or Indexed TIMESTAMP (they have the same storage space I believe).

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

Upvotes: 4

Views: 110

Answers (1)

Barmar
Barmar

Reputation: 780879

It shouldn't make a difference. Timestamps are represented internally as integers, so comparing and indexing them will be essentially the same.

Upvotes: 8

Related Questions