Subject | Re: Query optimization - Query PLAN |
---|---|
Author | Dmitry Yemanov |
Post date | 2012-06-18T12:05:45Z |
18.06.2012 11:37, lacakus wrote:
http://tracker.firebirdsql.org/browse/CORE-501
Dmitry
>Correct.
> I guess, that it is because COALESCE is internaly transformed into CASE
> WHEN <subselect> IS NULL then 0 else <subselect> end
> So in expression is subselect twice.
> My question is if <subselect> is really executed twice for every row inOptimization happens only in Firebird 2.5 and above:
> table1? or is there internal optimization where duplicate expressions
> are reduced?
http://tracker.firebirdsql.org/browse/CORE-501
Dmitry