Subject Re: [firebird-support] Re: Performance of Firebird vs. other DBMS
Author David Johnson
On Wed, 2005-08-17 at 13:09 +0000, laurenz_brein wrote:
> The article did not make it clear to me why a SELECT MAX() could
> not profit from an ascending index.

An ascending index would have to be traversed backwards to get a true
max. Firebird opted for unidirectional indexes (like DB2, which is a
locking database).

A descending index finds the most likely candidate first, and then if
there are issues it can go to the next most likely candidate.

Use ascending indexes for min (), and descending indexes for max() in
any system with unidirectional indexes.