Subject Re: [firebird-support] Sort precedence in execution plan
Author Jerome Bouvattier
Hi Gary,

> >
> > The optimizer wants to use the indice that exists on Saleprice. What is
> > highly inefficient in this case (several minutes to return).
>
> Hi Jerome
>
> When the optimizer throws me curve balls I normally resort to the
> following - I hope it can sort your problem out too.
>
> Prepare the 1st query and make a note of the plan generated. Add that plan
> to the second query to override the optimizer plan.


Thanks. However, I try to stay away from explicit PLAN clauses. They are
more of a pb in the end. I prefer to tweak the main SQL so that the desired
PLAN gets used.

--
Jerome