Subject | Re: [firebird-support] 2.1.2 uses a less optimised execution path |
---|---|
Author | Dmitry Yemanov |
Post date | 2009-05-15T04:28:15Z |
Huan Ruan wrote:
compiler versions. Unfortunately, I don't remember what GCC versions are
used to build both these FB releases.
A short answer is that there's no predefined evaluation order for
predicates in Firebird. In fact, this depends on the compiler used to
build the FB binaries. So what you observe is not really a bug, but
rather a side effect of some implementation detail. It's going to be
fixed in v2.5 though, at least to work similarly in all environments,
i.e. always from left to right (no promises for the smart re-ordering of
predicates yet).
Dmitry
>Interesting. The only reason of the issue you mention would be different
>> I'm comparing LI-V6.3.2.18118 Firebird 2.1 vs LI-V6.3.1.12855 Firebird 2.0.
compiler versions. Unfortunately, I don't remember what GCC versions are
used to build both these FB releases.
>> Thanks for running the script, Dmitry. But I just ran it again to be sure,I was testing on Windows, this somewhat confirms my guess stated above.
>> still the result is 6 index reads on ExcludedFile with v2.1.2 but 2 index
>> reads with v2.0.3.
A short answer is that there's no predefined evaluation order for
predicates in Firebird. In fact, this depends on the compiler used to
build the FB binaries. So what you observe is not really a bug, but
rather a side effect of some implementation detail. It's going to be
fixed in v2.5 though, at least to work similarly in all environments,
i.e. always from left to right (no promises for the smart re-ordering of
predicates yet).
Dmitry