How to Use Paste the Plan

Step 1: get an execution plan. In SQL Server Management Studio, you’ve got a few different options:

  • Get the estimated execution plan by hitting control-L or clicking Query, Display Estimated Plan. Right-click on the graphical plan, and click View XML. Copy all of that.
  • Or even better, get the actual plan by first clicking Query, Include Actual Execution Plan, and then running the query. After it finishes, click on the Execution Plan tab, right-click on the plan, and click View XML. Copy all of that.
  • Don’t know which query to check out? Get your top 10 most resource-intensive queries using the totally free sp_BlitzCache.

Make sure it’s 2MB or less. Right now, we cap it there because browsers have a tough time uploading & rendering larger plans.

Make sure it doesn’t have private data. Your company may consider database names, index names, queries, or parameters to be private data. (This same advice holds true whenever you script a database, give someone a query, or post a question online, but I feel like I just gotta repeat it here to be clear.)

Step 2: paste it into Paste the Plan. That part is pretty easy, but if you run into questions, hit the FAQ.

Step 3: get someone to help you with it. Take the link and go to one of these sites:

  • DBA.StackExchange.com – like StackOverflow, but for database administrators. Gamified with reputation points, and you can post bounties on plans to get help faster.
  • SQLServerCentral.com forums – if you prefer old-school forums, this is by far the most lively of the SQL Server forums out there.
  • Forums.SQLteam.com – like DBA.se, but a different user base, including our very own Tara Kizer.
  • MSDN.Microsoft.com forums – staffed by lots of MVPs and community volunteers, plus Microsoft employees.
  • Answers.SQLperformance.com – not as lively as the above options, but populated by some gurus like Paul White and Aaron Bertrand who seem to love fixing queries for free, so there’s that!

Or want to learn how to performance tune it yourself? Here’s some of our favorite resources: