When we index a timestamp field like timetime. Can we use it for
ORDER BY timetime DESC or is it just usable for
ORDER BY timetime ASC OR
ORDER BY timetime? Does mySQL use this index when doing vise verse ordering?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
Yes, it does. MySQL can use the index and use it for scanning/seeking in either direction. You can read in MySQL documentation: How MySQL Uses Indexes