Re: Tuning of a query...
Posted in 2004
"Vijay Kumar" <rudrappa@india.hp.com> wrote
> Does it improve the performance if we change the table
> position and join orders. For ex:
>
> SELECT *
> FROM table1 a, table 2 b
> WHERE a.col1 = b.col2
> AND a.col2 = b.col2>
> Ie, if table1 has more data than table2. If we interchange
> the positions.. Does it improve the performance.
> Similarly changing the order of the joined columns.
>
> Or does the Informix optimizer is smart enough to take care
> of this??? Plz let us know regarding this.
why don't u set explain on and study the result.
AFAIK it does not make any difference. Informix optimizer will treat both
of them the same way. It should be like that only. We don't want to go back
to the dark days of primitive optimizers of RDBMS in early 1990s in which
ordering of table / columns in joins were important in performance.