|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Tuesday, August 14, 2007 1:40 PM
Points: 42,
Visits: 1
|
|
|
|
|
|
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"
|
|
|
|
|
SSC 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
|
|
|
|
|
SSC 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
|
|
|
|