Subject Re: [firebird-support] max() on primary key very slow
Author Matthias Hanft
ruchbah@... wrote:
>
> I have a table with the column 'ID' as BIGINT unique primary key.
> select max(ID) from T
> So Firebird seems to do plan a full table scan. (Hallo, anyone at home?
> I have an unique index on that column ;-) )

As far as I know, you need a DESC index for MAX queries.

Matt