Results 1 to 2 of 2

Thread: How do I run 'explain' on a sql??

  1. #1
    Christina Guest

    How do I run 'explain' on a sql??


    Hi, does anyone know how to run an 'explain' on a sql query on SQL Server 2000?

    Thanks.

  2. #2
    Kurt Guest

    How do I run 'explain' on a sql?? (reply)

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •