This project has moved. For the latest updates, please go here.
0

Closed

Decorrelation is performed before NullScanOptimization

description

The following query should be better optimized. The filter should have been pulled out and LSJ should have been removed.

SELECT  *
FROM    [Order Details] od
WHERE   NOT EXISTS (
            SELECT  MAX(o.OrderDate)
            FROM    Orders o
            WHERE   o.OrderID = od.OrderID
        )
OR      od.OrderID > 100

The problem is that that decorrelation is done before NullScanOptimization so that the decorrelation cannot pull out the filter.
Closed Oct 31, 2014 at 6:26 AM by terrajobst

comments