Subject | Re: [firebird-support] slow select max() query |
---|---|
Author | Kirill Nesterenko |
Post date | 2009-03-09T22:05:01Z |
>>Query: select max(ID) from TABLE where FIELD=4Thank you, Helen - once created desc index on ID - query executes
>>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.
immediately ( <16 ms)!
BTW, also noticed that index on TABLE(FIELD) actually harms - execute time
is 64ms...
> ./heLenKirill.