4

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 ?

Community
  • 1
  • 1
epeleg
  • 10,347
  • 17
  • 101
  • 151
  • 3
    With all due respect to the voters for closing my Q as a duplicate. The quoted Q refers to MS SQL Server while I asked a similar Q but about MySql. Not to mention that looking at the answer provided below by AndreKR means that the answers are actually different for those to different environments. – epeleg Dec 26 '12 at 08:58

0 Answers0