Sqlserver-dba.com

Subscribe

Subscribe to RSS feed  Follow @jackvamvas - Twitter

Enjoy this post? Enter your email address for updates on new posts:

Delivered by FeedBurner

Email +Jack Vamvas at jack@sqlserver-dba.com

SQLServer-DBA.com Links

Subscribe to newsletter

Dba_db2_button

Powered by TypePad
SQL Server – SQL Execution plan and SET SHOWPLAN_XML – some basic tips

18 July,2012 by Jack Vamvas

Since SQL Server 2005 , the SET SHOWPLAN_XML is the recommended method to gather SQL Execution Plan information. Analysing the Execution Plan offers great clues for troubleshooting and improving query performance time. 

The SET SHOWPLAN_XML  according to SQL Server BOL “Causes SQL Server not to execute Transact-SQL statements. Instead, SQL Server returns detailed information about how the statements will be  to be executed in the form of a well-defined XML document”

Things to look for:

1) Use an XML Editor – such as IE , which allows you to expand and collapse the hierarchy

2) Clustered Index Scans – Focus on estimated rows . Why does Query Optimizer choose a Clustered Index Scan?

3) Missing Indexes – allows some useful information. Basically, the optimizer suggests that the suggested index will improve performance – with an impact attribute percentage figure. Don’t  automatically create the Missing Index. First , commit a update statistics, rerun query – has anything changed?

 Second , look at the suggested index – weigh up , how often is this query used versus the  maintenance overhead . 

4) Information such as the CachedPlanSize will help you estimate if your query exceeds one page in length. This impacts how the cached plan is managed in memory. More of this topic in a future post

 


Author: Jack Vamvas (http://www.sqlserver-dba.com)

Enjoy this post? Enter your email address for updates on new posts:

Delivered by FeedBurner

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment


sqlserver-dba.com | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact|Copyright & Disclaimer