Related pages: |
The Database Query Execution Plan window can help you to determine the most efficient execution plan for your queries. Once 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.
To access the Database Query Execution Plan window:
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:
Field Name | Description |
---|---|
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 Name | The 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 Cost | The estimated CPU cost to perform the operation |
Estimated number of rows | The 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 Name | Description |
---|---|
Operation | The name of the internal operation performed in the step (such as, TABLE ACCESS ) |
Options | A variation on the operation that is described in the Operation column (such as, FULL ) |
Referenced Objects
Field Name | Description |
---|---|
Tree Node | The step number in sequence used in the execution plan |
Operation | The object scan operation (table or index) in the execution plan |
Object Type | The type of the database object (index or table) |
Object Name | The name of the database object |
From the Database Query Execution Plan window, you can view: