Subject | Re: [firebird-support] query performance problem |
---|---|
Author | Arno Brinkman |
Post date | 2004-04-07T08:16:49Z |
Hi,
What happend if you change your query to
SELECT
count(*),
finishedStep
FROM
item
WHERE
job=22
GROUP BY
finishedStep,
job
This will ignore the optimizer to choose FK317B13C3E6B25E for ordering and
you should see a PLAN like :
PLAN SORT(ITEM INDEX (FK317B1319BBD))
Regards,
Arno Brinkman
ABVisie
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Firebird open source database (based on IB-OE) with many SQL-99 features :
http://www.firebirdsql.org
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/
Support list for Interbase and Firebird users :
firebird-support@yahoogroups.com
Nederlandse firebird nieuwsgroep :
news://80.126.130.81
> I am not quite shure if this is what you mean:That is indeed what he meant.
>
> Plan:
> PLAN (ITEM ORDER FK317B13C3E6B25E)
>
> Adapted plan:
> PLAN (ITEM ORDER FK317B13C3E6B25E)
> "select count(*), finishedStep from item where job=22 group byfinishedStep"
What happend if you change your query to
SELECT
count(*),
finishedStep
FROM
item
WHERE
job=22
GROUP BY
finishedStep,
job
This will ignore the optimizer to choose FK317B13C3E6B25E for ordering and
you should see a PLAN like :
PLAN SORT(ITEM INDEX (FK317B1319BBD))
Regards,
Arno Brinkman
ABVisie
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Firebird open source database (based on IB-OE) with many SQL-99 features :
http://www.firebirdsql.org
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/
Support list for Interbase and Firebird users :
firebird-support@yahoogroups.com
Nederlandse firebird nieuwsgroep :
news://80.126.130.81