Subject Re: [firebird-support] slow select max() query
Author Kirill Nesterenko
>>Query: select max(ID) from TABLE where FIELD=4
>>I have both indices:
>>create index IDX1 on TABLE(FIELD)
>>create descending index IDX2 on TABLE(FIELD)

> If the descending index is on the column that is being evaluated by MAX(),
> yes. Your IDX2 doesn't help at all.

Thank you, Helen - once created desc index on ID - query executes
immediately ( <16 ms)!

BTW, also noticed that index on TABLE(FIELD) actually harms - execute time
is 64ms...

> ./heLen

Kirill.