Subject | Re: [firebird-support] Not using index for MAX |
---|---|
Author | Alexandre Benson Smith |
Post date | 2007-10-26T21:05:07Z |
Erick Sasse wrote:
index on MY_PK_FIELD and it would be used.
see you !
--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br
> If I have a integer PK and do a "SELECT MAX(MY_PK_FIELD) FROM MYTABLE"Because you have an ASCENDING index on MY_PK_FIELD, create a DESCENDING
> it doesn't use the index to find the max value, why?
>
> Thanks.
>
>
index on MY_PK_FIELD and it would be used.
see you !
--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br