Subject Re: [ib-support] select max(id)
Author Lucas Franzen
Jan Agermose schrieb:
> 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?
> Jan Agermose

Because the primary key is defined as an ASCENDING index.
When executing "select a MIN (ID)" you'll notice that the
RDB$PRIMRAY-index will be used.