• I have 2 suggestions for you (none of them include an index because I'm no expert on them).

    1. Include the actual execution plan files (.sqlplan) that contain more information than the screenshots of the estimated execution plans show.

    2. Instead of using a CTE, use a temp table (#Table). This might improve the performance of your query.

    I hope you stay fine with the arrival of Sandy.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2