![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I'm fairly new to SQL Server, but using version 2005 and I have SQL Server Management Studio. When I run a query, I can right click to display an execution plan. However, for certain queries, this graphic becomes unruly (really, really big). Is there a way I can have a more text-based summary of what is happening -- indexes used, table scans performed, and the like? Thanks, - Dave |
#3
| |||
| |||
|
|
I'm fairly new to SQL Server, but using version 2005 and I have SQL Server Management Studio. When I run a query, I can right click to display an execution plan. However, for certain queries, this graphic becomes unruly (really, really big). Is there a way I can have a more text-based summary of what is happening -- indexes used, table scans performed, and the like? |
#4
| |||
| |||
|
|
Yes, there are several - depending on how much detail you want and what format you want it in. *There are three different options you can turn on. ShowPlan_Text (which gives you a short version of the plan), ShowPlan_All (which gives you a much more detailed version of the plan), and ShowPlan_XML (which gives you the most information - it's in the form of a XML document). One thing to remember about all of these options is when any one of them is turned on for a connection and you run a query, SQL doesn't actually run the query and return results, instead it creates an exeecution plan and returns that plan. You can turn any of these options on or off by using a SET statement. *Try, for example, the following code to see the different types of information you can recieve. You can also turn on or off ShowPlan_Text in SSMS by choosing Query from the menu, the Query Options... *That will bring up a dialog, in the box on the left, choose Execution Advanced. *Then check or uncheck SET SHOWPLAN_TEXT. Sample code showing the results of each of the options. Select COUNT(*) From sys.objects; go Set ShowPlan_Text On; go Select COUNT(*) From sys.objects; go Set ShowPlan_Text Off; go Set ShowPlan_All On; go Select COUNT(*) From sys.objects; go Set ShowPlan_All Off; go Set ShowPlan_XML On; go Select COUNT(*) From sys.objects; go Set ShowPlan_XML Off; go Tom "laredotorn... (AT) zipmail (DOT) com" <laredotorn... (AT) gmail (DOT) com> wrote in message news:7f19d347-516a-447d-a674-f001ed7933b3 (AT) s24g2000pri (DOT) googlegroups.com... Hi, I'm fairly new to SQL Server, but using version 2005 and I have SQL Server Management Studio. *When I run a query, I can right click to display an execution plan. *However, for certain queries, this graphic becomes unruly (really, really big). *Is there a way I can have a more text-based summary of what is happening -- indexes used, table scans performed, and the like? Thanks, - Dave |
#5
| |||
| |||
|
|
Yes, there are several - depending on how much detail you want and what format you want it in. There are three different options you can turn on. ShowPlan_Text (which gives you a short version of the plan), ShowPlan_All (which gives you a much more detailed version of the plan), and ShowPlan_XML (which gives you the most information - it's in the form of a XML document). One thing to remember about all of these options is when any one of them is turned on for a connection and you run a query, SQL doesn't actually run the query and return results, instead it creates an exeecution plan and returns that plan. You can turn any of these options on or off by using a SET statement. Try, for example, the following code to see the different types of information you can recieve. You can also turn on or off ShowPlan_Text in SSMS by choosing Query from the menu, the Query Options... That will bring up a dialog, in the box on the left, choose Execution Advanced. Then check or uncheck SET SHOWPLAN_TEXT. Sample code showing the results of each of the options. Select COUNT(*) From sys.objects; go Set ShowPlan_Text On; go Select COUNT(*) From sys.objects; go Set ShowPlan_Text Off; go Set ShowPlan_All On; go Select COUNT(*) From sys.objects; go Set ShowPlan_All Off; go Set ShowPlan_XML On; go Select COUNT(*) From sys.objects; go Set ShowPlan_XML Off; go Tom "laredotorn... (AT) zipmail (DOT) com" <laredotorn... (AT) gmail (DOT) com> wrote in message news:7f19d347-516a-447d-a674-f001ed7933b3 (AT) s24g2000pri (DOT) googlegroups.com... Hi, I'm fairly new to SQL Server, but using version 2005 and I have SQL Server Management Studio. When I run a query, I can right click to display an execution plan. However, for certain queries, this graphic becomes unruly (really, really big). Is there a way I can have a more text-based summary of what is happening -- indexes used, table scans performed, and the like? Thanks, - Dave |
![]() |
| Thread Tools | |
| Display Modes | |
| |