Re: SQL Optimizer
Posted in 1997
Emil Sarkissian wrote:
>
> Does anyone know what "Estimated Cost" really
> means, when the sqexplain.out file is generated
> by OnLine 5.1?
>
> When I add silly conditions like:
>
> SELECT ps.ln
> WHERE ps.sheet_date BETWEEN BeginDate AND EndDate
> AND ps.ln = ps.ln -- ??? cost goes down ???>
> the cost moves goes down...
>
> BTW Is there a comprehensive explanation of HOW
> the optimizer makes its decisions?
First, I aggree with David Williams, read your SQL manual
or join one of the Informix courses.
Second, because the optimizer works cost based, it tells
you s.th. about the costs. Whenever the optimizer created
a wrong query plan, it has used the path that produced
the lowest costs based on your current statistics. In
other words, concentrate on the remaining outputs of the
optimizer.
Bye
Stefan