Subject Re: [ib-support] select max(id)
Author Helen Borrie
At 02:20 PM 07-05-02 +0200, you wrote:
>why is that a select max(id) from XX where id is the primary key on XX
>makes the query read the whole table? Isn't there a implicit index if
>you declare a primary key?

Yes, but it is an ascending index. Create a descending one if you want a
quick result from MAX().

--- H

All for Open and Open for All
Firebird Open SQL Database · ·