Press "Enter" to skip to content

Descending Order in Indexes

Brent Ozar explains that sometimes you’ll need to slap a DESC on your index columns:

The short answer is that if your query orders columns by a mix of ascending and descending order, back to back, then the index usually needs to match that same alternating order.

Now, for the long answer. 

Do read on for the long answer, however.