by Markus Winand.

Getting an Execution Plan

There are two ways to obtain an execution plan:


You can put the current database session into plan-only mode by issuing this command:


Every sub sequentially executed command will just return it's execution plan rather than being executed. This is the better approach to obtain an execution plan because the output is more verbose.

Of course, you can disable plan-only mode again by setting it to OFF.

The execution plan shown by plan-only is also stored in SYSADM.PLAN_TABLE. Note that you need to disable plan-only before selecting from PLAN_TABLE—otherwise you just plan the query on PLAN_TABLE.

Session → Execution Plan / Tree-Button

After actually running a query you can obtain it's execution plan via the menu SessionExecution Plan or by pushing the "Tree-Icon" in the toolbar. This opens a new window showing the execution plan. Note that the output format is different from the output provided by the plan-only approach.

About the Author

Photo of Markus Winand

Markus Winand teaches efficient SQL—inhouse and online. He minimizes the development time using modern SQL and optimizes the runtime with smart indexing—for that he also published the book SQL Performance Explained.

Markus’ Book

Cover of “SQL Performance Explained”: Squirrel running on grass

The essence of SQL tuning in 200 pages.

Buy from Markus
(paperback and/or PDF)

Buy from Amazon
(paperback only)

Hire Markus

…to answer your current SQL questions.

The quick and easy way to benefit from his extensive knowledge and experience. Learn more»

“Use The Index, Luke!” by Markus Winand is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported License.
Legal | Contact | NO WARRANTY | Trademarks | Privacy | CC-BY-NC-ND 3.0 license