This Q is about MySql - to read about ascending or descending indexes in MS SQL you can look here: SQL Server indexes - ascending or descending, what difference does it make? It refers to a different DB and has a different answer.
Will specifying Asc
or Desc
on an index in MySql accelerate queries for items that are at the edges of the index?
If I have a table with an integer column and an index on that column, and I know that most of my queries on this field will look for the high values, would it help if the index is defined as descending?
Will it cause the more recent values to be found first?
@AndreKR noted that this is actually not supported yet. Should I still mark such an index as Desc
, in hope that in some future version It will become significant? Or should I ignore this option until it has some real meaning ?