Subject | Re: [ib-support] How to improve select performance |
---|---|
Author | Tomislav Avramovic |
Post date | 2002-11-27T00:41:02Z |
Try this
select
min(T.Data)
from Turno T
LEFT join
MaquinaOcupacao MO on (MO.TurnoID = T.TurnoID)
where
T.Data > '2002-12-01' and
MO.MaquinaID = 17
Adapt your result plan for table Turno to index SK_TURNO_DATA
PLAN(T INDEX (SK_TURNO_DATA))
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.422 / Virus Database: 237 - Release Date: 20.11.2002
select
min(T.Data)
from Turno T
LEFT join
MaquinaOcupacao MO on (MO.TurnoID = T.TurnoID)
where
T.Data > '2002-12-01' and
MO.MaquinaID = 17
Adapt your result plan for table Turno to index SK_TURNO_DATA
PLAN(T INDEX (SK_TURNO_DATA))
> Hi people,development
>
> I have a database with Dialect 1 and 8K Page Size running on my
> machine that is a PIII 1GHZ 256 MB RAM on Windows XP. I need to run the(RDB$PRIMARY206,SK_TURNO_DATA))
> following query:
>
> select
> min(T.Data)
> from
> Turno T join
> MaquinaOcupacao MO on (MO.TurnoID = T.TurnoID)
> where
> T.Data > '2002-12-01' and
> MO.MaquinaID = 17
>
> Wich should return
> '2002-12-02' for this case...
>
> the execution plan is:
> PLAN JOIN (MO INDEX (RDB$FOREIGN209),T INDEX
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.422 / Virus Database: 237 - Release Date: 20.11.2002