Lynn Pettis (11/5/2011)
You haven't posted everything requested. Read the article I referred you to, you know, the first one in my signature block. You should also read the second one as well.
Sample Data -- Enough to properly represent the problem domain, you have to decide how much this is.
How to post the execution plan, directly from the second article:
Saving the execution plan <<-- Go to this section to see the figures.
The method of saving and posting the version of SQL that’s being used. Not the version of the client tools, but the version of the database server.
SQL 2005 and above
A very welcome feature that was added to SQL 2005 was the ability to save the execution plan of a query in an XML format, and be able to load that xml file into management studio to see the full graphical plan.
To save the execution plan, click the “Include Actual Execution Plan” in the toolbar and then run the query. Once the query has completed, right click on the plan and select “Save Execution Plan As...” then save the file as a .sqlplan file.
If the query takes too long to run (or doesn’t complete), then the estimated execution plan can be posted instead. This is not ideal as there’s a fair bit of info missing from the estimated plan, so it should only be used when the actual plan is not an option. To get the estimated plan, click the toolbar button “Display Estimated Execution Plan” and then save the resulting plan in the same way.
Once the plan has been saved, zip it and attach the zipped file to your post using the Attachments option found below the main posting text box.