Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decorrelation is performed before NullScanOptimization #19

Open
terrajobst opened this issue Oct 31, 2014 · 0 comments
Open

Decorrelation is performed before NullScanOptimization #19

terrajobst opened this issue Oct 31, 2014 · 0 comments

Comments

@terrajobst
Copy link
Owner

Ported from CodePlex

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant