Subject Re: [firebird-support] query performance problem
Author Dimitry Sibiryakov
On 7 Apr 2004 at 10:04, Tobias Jenkner wrote:

>Plan:
>PLAN (ITEM ORDER FK317B13C3E6B25E)

Is this whole plan? I don't see how it filter records by JOB...

Nevertheless, first of all drop these indexes:

>>>CREATE INDEX FK317B1319BBD ON ITEM (JOB);
>>>CREATE INDEX FK317B132AFA43C6 ON ITEM (INDEXCLASS);
>>>CREATE INDEX FK317B13C3E6B25E ON ITEM (FINISHEDSTEP);

Then try to rewrite your query this way:

select count(*), job, finishedStep from item where job=22
group by job, finishedStep

Later, try to drop index FOO and see results.

SY, Dimitry Sibiryakov.