Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Displaying Execution Plans Expand / Collapse
Author
Message
Posted Sunday, July 27, 2003 12:00 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, August 14, 2007 1:40 PM
Points: 42, Visits: 1
Comments posted to this topic are about the content posted at http://www.sqlservercentral.com/columnists/RDyess/displayingexecutionplans.asp


Post #14612
Posted Sunday, July 27, 2003 10:02 PM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Tuesday, July 31, 2007 8:20 AM
Points: 885, Visits: 1
Hi Randy

So whats the combo of commands to "get a text based execution plan after the execution of the statement", as showplan_all and showplan_text dont physical execute the parsed statement but return the text output. Just missing in the article.

Nice summary btw, beats hunting around the docs. May be worth detailing the output though (where applicable) and gotchas to watchout for, esp the time and IO stats.

Cheers

Ck


Chris Kempster
www.chriskempster.com
Author of "SQL Server 2k for the Oracle DBA"



Chris Kempster
www.chriskempster.com
Author of "SQL Server Backup, Recovery & Troubleshooting"
Author of "SQL Server 2k for the Oracle DBA"
Post #72320
Posted Monday, July 28, 2003 6:57 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, August 14, 2007 1:40 PM
Points: 42, Visits: 1
Review the section over SET STATISTICS PROFILE. This command will allow the query to execute as well as return the execution plan.

I also plan on detailing the output over several articles as I feel that the explanation would be too long to fit in a single article. I will start working on a side article that explains the commands in more details and go over some of the "gotchas" you asked for.

Randy





Post #72321
Posted Tuesday, August 19, 2003 6:59 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, December 19, 2003 12:00 AM
Points: 35, Visits: 1
Thanks for the tip on SET STATISTICS PROFILE ON, I'd given up on thinking that you could get the execution plan back in text from Query Analyzer when the SQL was actually executing - I though it would only show the estimated plan if you wanted a text based Execution Plan this is going to help me a lot in my job.

Maybe, and I know I might be jumping ahead as you have other articals on the way, you could answer my other burning question.

When you SET STATISTICS TIME ON and run several SQL statement is the CPU time and Elapsed time a cumalative of all statements run in the batch or just the statement it is reporting back on - I've never been able to find a definitive answer and had kind of given up.

Thanks,

Andy



Post #72322
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse