Subject Re: [firebird-support] Index question
Author Ann W. Harrison
> On 10/26/2010 5:42 PM, Paul R. Gardner wrote:
>> Say I have an INVOICE table that has an ID field as a primary key. As I
>> add invoices, a generator gets the next value so the field runs 1 - n.
>> Should the index be ascending or descending?

On 10/26/2010 6:18 PM, Ann W. Harrison wrote:

> The primary key declaration automatically generates an ascending index.
> If the field you want to index is the primary key, just accept the
> ascending index. It will be fine.

And a lot of other stuff, basically arguing that a descending index
isn't any faster for looking up big numbers than an ascending index.
So why have them at all? If you've got 90 thousand widgets, a
descending index make queries like this faster:

SELECT FIRST 20 widgets ORDER BY id DESCENDING


Good luck,

Ann