Subject Re: Puzzled by choice of plan
Author Svein Erling Tysvær
Set, stop thinking of STARTING WITH as similar to BETWEEN.

Thanks Arno, that explains it and means that I should add "IS NULL /
STARTING WITH" to my mental list of things to watch out for (not
necessarily avoid) when writing queries.

Set

--- In firebird-support@yahoogroups.com, "Arno Brinkman" wrote:
> Hi,
>
> The problem lies in the fact that the FB1.5.x (and earlier)
> optimizer doesn't optimize "IS NULL / STARTING WITH" operations very
> well. First it isn't used for the JOIN order calculation and second
> those are not combined (when possible ofcourse) with other
> comparisons. I'm sure the FB2 optimizer does a better job here, but
> with using the new ODS!
>
> Regards,
> Arno Brinkman
> ABVisie