Subject | Re: [ib-support] (RESULTS) Re: How to improve select performance |
---|---|
Author | Arno Brinkman |
Post date | 2002-11-27T16:04:39Z |
Hi,
<...snip>
because Turno has a less records than MaquinaOcupacao this speeds up the
query a lot.
btw Have you already run SET STATISTICS INDEX <index name> for all indices ?
Regards,
Arno Brinkman
<...snip>
> Tomislav Avramovic:<snip>
>
> 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
>
> PLAN JOIN (T INDEX (SK_TURNO_DATA),MO INDEX (RDB$FOREIGN210))
> Reads 422
> writes 31
> Execution Time 1.0035 sec
> GOOD RESULTS !!!
> Just one thing, before I run the statment from Tomislav I thought that theimpressed
> speed will not be so good because of the left join, I am a little
> that a left join produces better results than a natural join... Anycomments ?
>In this case the LEFT JOIN force that Turno is used as "base" table and
> thanks again !
because Turno has a less records than MaquinaOcupacao this speeds up the
query a lot.
btw Have you already run SET STATISTICS INDEX <index name> for all indices ?
Regards,
Arno Brinkman