Subject Re: [firebird-support] 2.1.2 uses a less optimised execution path
Author Dmitry Yemanov
Huan Ruan wrote:
>
> Just try to understand a bit more here, could you elaborate more here about
> the from left to right and smart re-ordering.

Imagine a conjunct: "where COND_A and COND_B"

Currently, these two conditions can be evaluated as {COND_A, COND_B} or
{COND_B, COND_A}, depending on the compiler used to build the FB binaries.

In FB v2.5, it's expected that the evaluation will always be in order
{COND_A, COND_B}, i.e. in order or their appearance in the WHERE clause
(counting from left to right).

A smart re-ordering would mean to re-arrange the predicates based on
their estimated cost and evaluate them from the cheapest one (e.g.
simple comparison) to the most complex one (e.g. subquery). This is
exactly what you were referring to in the original post of this thread.
This is not supported in FB yet, but scheduled for the future. No
promises it will be done in v2.5 though.


Dmitry