• Luis Cazares (12/5/2014)


    After analyzing your query and Eddie's, I keep wondering what are you trying to accomplish. This can certainly be a major problem with cartesian products. Could you post DDL, sample data and expected results? Actual Execution Plan can help to confirm the problem that I imagine.

    I don't know that I'd call this a Cartesian product. The WHERE clause defines join criteria. It's just doing it in ANSI 89 syntax instead of the more modern approach. Not a choice I'd make, but I'll bet if you moved the them to the ON clause the execution plan probably wouldn't change a bit.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning