• Assuming the query can complete, run it with show actual execution plan enabled. Then start looking for a) huge disparities between estimated and actual rows and b) sort/hash spills to disk. When you see either, consider a temp table intermediate object to break things apart and give the optimizer a better chance to get good plans (and avoid spills).

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service