Hi, does anyone know how to run an 'explain' on a sql query on SQL Server 2000?
Thanks.
Printable View
Hi, does anyone know how to run an 'explain' on a sql query on SQL Server 2000?
Thanks.
Christina,
You're trying to find the Query Execution Plan. The equivalent for an
Oracle 'Explain' is 'Set SHOWPLAN_ALL ON/OFF'. You can run it from the
Query Analyzer like this:
Set SHOWPLAN_ALL ON
(You query goes here)
GO
When you execute this it will show you the execution plan in the results pane.
There is another way you can do this to, you may find it interesting. It is a graphical execution plan. In the Query Analyzer got to Query on the menu bar and select Display Estimated Execution Plan. Then run your query.
Hope this helps....
------------
Christina at 6/27/01 10:30:46 AM
Hi, does anyone know how to run an 'explain' on a sql query on SQL Server 2000?
Thanks.