Related pages:

The Database Query Execution Plan window can help you to determine the most efficient execution plan for your queriesOnce you've discovered a potentially problematic query, you can run the EXPLAIN PLAN statement to check the execution plan that the database created. A query's execution plan reveals whether the query is optimizing its use of indexes and executing efficiently. This information is useful for troubleshooting queries that are executing slowly.

Access the Database Query Execution Plan Window

To access the Database Query Execution Plan window:

  1. To view a query execution plan, click the name of the database.
  2. Click the Queries tab.
  3. Click a SELECT statement to examine and click View Query Details.
  4. Click the Execution Plan tab.

Database Query Execution Plan Window Features

From the Database Query Execution Plan window, you can:

If you are using SQL Server or Azure you can view the execution plan in one of the following ways:

If you are using MySQL, you can also:

If you are using MSSQL, you can perform these steps to view the costly operations (the amount of work such as CPU usage, I/O, and memory required to complete the operation) in the execution plan along with the warnings (if any) in the plan:

  1. Under Query Plan Handle(s), select a cached execution plan.
  2. Click View Cached Plan.
    You can view the following details:
    Top Plan Operations:
Field NameDescription
Operation

The object scan (table or index) operation in the execution plan

Database

The database name of the object

Schema

The schema of the object in the database
Object NameThe name of the object (table or index) that is scanned in the operation

Estimated I/O Cost

The estimated cost of the input/output (I/O) to perform the operation
Estimated CPU CostThe estimated CPU cost to perform the operation
Estimated number of rowsThe estimated number of rows in the object

Warnings: This table includes the warnings in the execution plan related to any issue such as Typecast. This table helps you in understanding the potential performance-degrading activities that happen during the query execution. This table includes these fields:

If you are using Oracle database, you can view the cached execution plan details along with the top plan operations and the referenced objects. To view the details, double click a cached execution plan under View Cached Plan(s). These details are displayed:

Top Plan operations

Field NameDescription
OperationThe name of the internal operation performed in the step (such as, TABLE ACCESS)
OptionsA variation on the operation that is described in the Operation column (such as, FULL)


Referenced Objects

Field Name

Description

Tree NodeThe step number in sequence used in the execution plan
Operation

The object scan operation (table or index) in the execution plan

Object TypeThe type of the database object (index or table)
Object NameThe name of the database object

From the Database Query Execution Plan window, you can view: