4 ms·
Depending on 1) The storage engine you're using, and, 2) What other queries you run against this table You could cluster the table on the 'time' column. That
by marcua 16y ago
Depending on
1) The storage engine you're using, and,
2) What other queries you run against this table
You could cluster the table on the 'time' column. That would store the data in the table in the same order as it appears in the index, and make time-based range queries a lot faster.
- leif 16y agoShouldn't matter, this query shouldn't hit the data file. Clustering would just make fragmentation worse. I'd like to see the OP verify that it's only hitting the index file though (see my other post).