O'Reilly logo

Oracle Database Administration for Microsoft SQL Server DBAs by Michelle Malcher

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

SQL Plans

As a DBA, you know that tuning SQL statements is a good place to start improving performance. If changes can be made to the code or available indexes, that is normally the quickest way to get results.

With SQL Server, you can get the execution plan from SQL Server Management Studio or by enabling showplan_all. This will provide information about the plan for which order to join the tables and the indexes to use.

Oracle plans are available through the OEM tools, and they can be traced through SQL*Plus as well. The plans can be saved in the plan table or just seen in the output from the trace.

Viewing Explain Plans

Let’s first look at a quick way to use SQL*Plus to see the explain plan for a query.

## To see query results and the execution plan set autotrace ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required