SQL Plan analysis
Home > Select Project > Analysis > SQL Plan Analysis
Analyze SQL executed in the database to diagnose performance issues.\
SQL Plan Analysis consists of four tabs: Access Statistics, Plan Change, Segment Pattern, and SQL Plan Detail.
All four tabs have a maximum query period of 31 days. They also share the same period selection list: last 1 day, last 7 days, last 30 days, today, yesterday, and 7 days ago.
Access Statistics
The Access Statistics tab combines the execution plan history with SQL statistics to analyze how SQL accesses tables and which SQL to tune first. Select an unusual range in the overall trend, then check the SQL list, execution plans, and per-object contribution for that range on one screen. Use it to choose SQL tuning targets on Oracle and Oracle Pro instances.
Panel titles, table column headers, and option button labels are shown in English regardless of the screen language setting.
Screen layout
| Block | Description |
|---|---|
| Query conditions | Set the period, instance, filters, and aggregation options together, then search |
SQL Count trend | Shows the whole period as time-bucket bars. Click or Shift+click bars to specify the analysis range |
Access Type Summary | SQL count, execution count, and share per Access Type in the analysis range |
Access Type by SQL | Access Type composition and performance metrics per SQL |
Execution Plan | Execution plan tree of the SQL selected in the list |
Object Summary | Summary per object read by the selected SQL |
The query period and the analysis range are different
The trend chart shows aggregated data for the whole query period. The list, execution plan, and object summary below it query only data in the analysis range specified on the chart. Querying up to 31 days of execution plan steps at once slows down the response, so the analysis range is specified separately.
When you first open the screen, the single bucket with the highest SQL Count is set as the analysis range. To widen the range, click the start bar, then Shift+click the end bar. To analyze the whole period, click the first bar and Shift+click the last bar.
Setting the query conditions
-
Go to the Access Statistics tab in Analysis > SQL Plan Analysis.
-
Select the query period in the Time option. The default is 1 day, and you can specify up to 31 days. The period selection list offers last 1 day, last 7 days, last 30 days, today, yesterday, and 7 days ago.
-
Select the instance to query in the Instance option.
-
If needed, add conditions in the Filter option. The initial query applies the condition
Access Type=TABLE ACCESS FULL. -
Use the Exclude system objects switch to set whether SQL that reads only system objects is excluded from the list. It is on by default.
-
Click the
button.
The period, instance, filter, and aggregation options are applied together only when you click the search button. The display controls of the Access Type by SQL panel (All Plans/Latest Plan, Sort by, Rows, Thresholds, Access Type columns) recalculate the data already queried, so they are applied as soon as you select them.
Filter conditions
| Key | Description |
|---|---|
Access Type | Access method in the execution plan. Example: TABLE ACCESS FULL |
Owner | Schema that owns the object |
Object Name | Object name |
Conditions support two operators: equal (=) and not equal (!=). Use not equal to exclude a specific schema or object from the list.
Filters are applied per SQL. If an SQL has at least one execution plan step that matches the condition, all steps of that SQL are shown in the list. Filtering per step would drop only some steps and change the composition ratio.
Excluding system objects
Excludes SQL that reads no user objects from the list. System objects are objects in dictionary schemas such as SYS, SYSTEM, and XDB, and objects whose names start with X$, V$, GV$, SYS_, DBA_, ALL_, or USER_. It is on by default so that dictionary queries such as FIXED TABLE FULL do not hide user SQL.
Viewing the SQL Count trend
Select the metric and aggregation unit with the two options at the top of the chart.
| Option | Value | Description |
|---|---|---|
Metric | SQL Count, Executions, Elapsed | Metric shown by the bars. The default is SQL Count |
Interval | Hour, Day, Week | Time width covered by one bar |
Selecting a Metric also changes the panel title. The selected Access Type is overlaid on the full bars without reducing them, so you can see the share of that type in the total.
Interval Hour can be selected only up to 7 days
If the query period exceeds 7 days, the Hour button is disabled and the message "You cannot view data by hour for periods longer that 7 days." is shown. Seven days produce 168 hourly buckets, and longer periods make it hard to select a range.
If no Interval is selected, or the selected value is not available for the query period, the aggregation unit is set automatically by period: Hour for two days or less, and Day for longer periods.
Click a bar to set the analysis range to that single bucket, or Shift+click a bar to set it from the start of the current range to the clicked bar. The specified range becomes the query scope of the three panels below.
SQL Count bars count the SQL actually executed in each bucket. The filter and Exclude system objects conditions are evaluated against each SQL's execution plan and also applied to the bars.
Reading the Access Type Summary
Aggregates the SQL count and execution count per Access Type in the analysis range.
| Column | Description |
|---|---|
Access Type | Access method in the execution plan |
SQL Count | Number of SQL statements that used the access method |
Executions | Total execution count |
Share | Share based on execution count |
If one SQL uses both a Full Scan and a Range Scan, it is counted under both Access Types. Share is therefore the execution count share of SQL that used the access method, and the total can exceed 100%.
Working with the Access Type by SQL list
The list shows one row per combination of SQL and execution plan (sql_id + plan_hash_value).
Click the icon next to sql_id to open the SQL and execution plan on the SQL Plan Detail tab. Click query_text to open SQL details in a new window.
The list covers SQL actually executed in the analysis range. Execution plans are matched from the execution plan history saved starting 31 days before the start of the query period. SQL whose execution plan history is not found is not shown in the list.
When you select Latest Plan, metrics are shown based on the execution plan last executed within the analysis range.
Display controls
| Option | Default | Description |
|---|---|---|
All Plans / Latest Plan | All Plans | Basis for aggregating metrics. All Plans uses all execution plans in the analysis range, and Latest Plan uses the latest execution plan per SQL |
Sort by | Logical IO | Select from Logical IO, Elapsed, Executions, LIO / exec, and Steps |
Rows | Top 50 | Select from Top 20, Top 50, Top 100, Top 200, Top 500, Top 1,000, and No limit |
Click the settings icon at the top right of the panel to set the following items.
Thresholds: Excludes SQL belowMin executions(lower limit of execution count) andMin LIO/exec(lower limit of logical reads per execution) from the list. Both default to0. When you set a value, the settings icon changes to the highlight color.Access Type columns: Select the Access Type columns to show in the list. Types turned off are merged into theOthercolumn.
Column layout
| Group | Column | Description |
|---|---|---|
SQL | sql_id, plan_hash_value, query_text | SQL identifier and statement |
Composition | Steps, Breakdown | Number of execution plan steps and Access Type composition bar |
Performance | Executions, LIO/exec, Elapsed/exec(s) | Execution count and load per execution |
Access Type columns are grouped by risk into High Risk (FULL, PART), Caution (SKIP, FFS, IDXF), and Normal (RANGE, UNIQ, ROWID). Select the types to show in Access Type columns under the settings icon. Types turned off and the remaining steps not in the Access Type list are counted in the Other column.
The Access Types turned on by default are as follows.
| Access Type | Tier |
|---|---|
TABLE ACCESS FULL | High Risk |
PARTITION RANGE ALL | High Risk |
INDEX SKIP SCAN | Caution |
INDEX FAST FULL SCAN | Caution |
INDEX FULL SCAN | Caution |
INDEX RANGE SCAN | Normal |
INDEX UNIQUE SCAN | Normal |
TABLE ACCESS BY INDEX ROWID | Normal |
TABLE ACCESS STORAGE FULL, BITMAP INDEX, MAT_VIEW ACCESS, HASH JOIN, NESTED LOOPS, MERGE JOIN, and FIXED TABLE FULL are hidden by default and can be turned on in Access Type columns under the settings icon.
Viewing the selected SQL in detail
When you select a row in the list, the two panels below show the details of that SQL.
Execution Plan
| Column | Description |
|---|---|
Id | Execution plan step number |
Operation | Execution plan step |
Object | Object being accessed |
Cost | Cost estimated by the optimizer |
Object Summary
| Column | Description |
|---|---|
Object | Object name |
Access Type | How the object is read |
Index | Index used |
Cost Share | Share of the total cost |
The table is sorted by Cost Share in descending order by default. The object that contributes most to the load is shown at the top. Click a column header to change the sort.
Good to know
-
LIO(Logical IO) can be measured only per SQL. Values broken down by step are not provided, soAccess Type Summaryhas no LIO contribution column. -
If you select several Access Types on the trend chart, the sum of the overlaid values can exceed the full bar. This is because one SQL can use several types together. Overlaid values are shown only up to the height of the full bar.
-
The counts in the trend chart and the number of rows in the list can differ. The chart counts SQL, while the list shows one row per combination of SQL and execution plan and also applies the
RowsandThresholdssettings.
View SQL Details
If you select the query column from the SQL list at the bottom of the screen, the SQL details window appears. You can check the SQL query statements and plan information.
Click the View SQL Statistics → button to move to SQL statistics,
where you can view statistical information related to the selected SQL query.

-
Runtime Plan: It provides the execution plan and runtime information for a selected SQL query. It provides the information details such as execution count, average execution time, and average physical reads.
-
Explain Plan: It displays the execution plan predicted by the optimizer. It provides information such as cost, job, object name, and cardinality.
-
Plan History: You can check the history of the execution plans of the SQL queries executed in the database.
-
Bind Capture: You can check the bind variables used in SQL queries executed in the database. This allows you to see actual content of query executions.
NoteThis is a value captured in the database (
v$sql_bind_capture), not a bind value executed in real time. -
Trend: You can check the trend of execution metrics for the selected SQL in a time-series chart and a table. It shows changes in execution time, average metrics per execution, and parse counts (total and hard) in chronological order.
NoteThe set of metrics shown on the Trend tab differs between Oracle and Oracle Pro.
Checking Bind Capture values
The bind values on the Bind Capture tab are masked by default. They can contain actual customer data such as resident registration numbers or account numbers, so query permission alone is no longer enough to see them.
The list itself is queried without the parameter key, because the collection time, variable name, and data type are not sensitive information. Only the value column is masked with ******.
| Column | Description |
|---|---|
time | Collection time |
last_captured | The time the database last captured the bind value |
name | Bind variable name |
value | Bind value. Shown as ****** before decryption |
datatype | Bind variable data type |
child_number | Child cursor number |
To check the values, follow these steps.
-
Click the lock button at the top right of the Bind Capture tab.
-
When the Check decryption key window appears, enter the parameter key. You can find the parameter key in the paramkey.txt file in the agent installation path.
-
Click the Confirm button.
If the key is correct, the window closes and the value column is filled with the actual values. Some rows may still show a dash (-) after decryption; this means the agent could not capture the value of that variable. The notation differs so that it can be distinguished from the masked state (******).
If the lock button is not visible
The lock button does not appear for accounts without the sensitive information query (SECURITY_READ) permission. Contact your project administrator about permissions.
If you enter the wrong key
The message "Invalid parameter key." appears below the input field along with guidance to check paramkey.txt, and the window does not close. The reason for failure is not shown in more detail so that the key value carried in the request is not exposed on screen.
If the parameter key was changed during the query period, only some rows are filled, along with the message "The parameter key was changed during the query period, so some values were not decrypted."
A decryption query returns up to 500 rows at a time. If the limit is reached, more values may have been truncated.
AI Tuning Guide
The AI Tuning Guide analyzes SQL queries, plans, and statistical information to diagnose performance issues and suggest optimization strategies.
It helps developers and DBAs quickly identify bottlenecks and improve performance through efficient SQL optimization.
Usage Conditions and Notes
For PostgreSQL, MySQL, and SQL Server, query plan retrieval is required.
If the plan is not retrieved, the AI Tuning Guide icon appears as (disabled), and the feature cannot be used.
- Please note that AI-generated results are based on automated analysis and may not be 100% accurate.
-
Click the SQL you want to analyze and diagnose to move to the SQL details screen.
-
On the SQL details screen, click the AI Tuning Guide icon
at the bottom right to start the AI analysis.
-
Review the AI analysis results.
Result Item Description Query Plan and Summary Provides the purpose and execution summary of the query.
Analyzes execution count, cumulative execution time, and overall database load ratio to assess the query’s impact on system performance.Performance Analysis Provides performance scores and diagnostic results based on overall analysis.
Analyzes detailed resource usage such as CPU, disk, cache hit rate, and wait time to visually identify bottleneck areas during query execution.Key Issues Found Summarizes detected major issues. Optimization Recommendations Suggests optimized queries based on identified issues.
Plan Change
The same SQL can perform differently when its execution plan changes. On the Plan Change tab, check which SQL had execution plan changes and whether performance improved or degraded after the change.
Setting the query conditions
- Go to the Plan Change tab in Analysis > SQL Plan Analysis.
- Select the query period in the Time option. The default is 7 days, and you can query up to 31 days.
- Select the instance to query in the Instance option.
- If needed, add conditions in the Filter option.
- Click the
button.
Adding filters
- Click the add button in the Filter option.
- In the Add filter window, select a filter key:
sql_id,user, orprogram. - Select a condition and enter a value.
- Click the Apply button.
Click the + Add button to add multiple conditions, or click the Delete All button to delete all conditions.
Plan Change Chart
Shows the number of execution plan changes per period as a bar chart, split into good (shorter elapsed time) and bad (longer elapsed time). Select the aggregation unit from Auto, Hour, Day, and Week in the Interval option. The default is Day. Select or drag across bars to show only the changes in that range in the list below.
Plan Change Summary
List of SQL whose execution plan changed. Click the All, BAD, or GOOD button above the list to filter it, and select the number of rows per page in the Rows option.
- If the average elapsed time decreases after the change, the row is marked GOOD; if it increases, BAD. The same criterion applies even when the difference is very small.
- Rows whose elapsed time before or after the change could not be measured show
-for the elapsed time and flag, and are not shown on the chart. These rows are included only in All, so the All count can be greater than the sum of BAD and GOOD.
| Column | Description |
|---|---|
Date | Date the execution plan changed |
sql_id | SQL identifier. Click the icon next to it to open the SQL on the SQL Plan Detail tab |
query_text | Query text |
before_plan_hash_value | Hash value of the execution plan before the change |
after_plan_hash_value | Hash value of the execution plan after the change |
before_elapsed(s) | Average elapsed time before the change (seconds) |
after_elapsed(s) | Average elapsed time after the change (seconds) |
elapsed_time_diff(s) | Difference in elapsed time before and after the change (seconds) |
change_count | Number of execution plan changes |
flag | Performance change verdict (GOOD / BAD) |
Plan Change History
When you select a row in the list, the execution history of that SQL per execution plan is shown as a timeline and a table.
| Column | Description |
|---|---|
time | Execution time |
sql_id | SQL identifier |
sql_hash_value | SQL hash value |
child_number | Child number of the cursor |
before_plan_hash_value | Hash value of the previous execution plan |
after_plan_hash_value | Hash value of the current execution plan |
sid | Session ID |
user | User who executed the SQL |
program | Program that executed the SQL |
- Show whole period: Shows the history for the whole query period, not only the selected date.
- Compare plans: Compares the execution plans before and after the change side by side in Plan History on the SQL Plan Detail tab.
Segment Pattern
On the Segment Pattern tab, check the access methods per object (segment), such as tables and indexes, and the SQL that references each object.
Setting the query conditions
| Item | Description |
|---|---|
| Time | Query period. The default is 1 day, up to 31 days |
| Instance | Instance to query |
| Owner | Schema of the object. Select from the list of queried schemas. The default is All |
| Segment Type | Segment type. Select from All, TABLE, INDEX, and Partition only. The default is All |
| Segment | Search by table or index name (partial match, case-insensitive). Searching for a table also shows the indexes of that table |
After setting the conditions, click the button. System objects are always excluded.
Selecting Partition only shows only objects accessed per partition. These are objects read under a PARTITION step in the execution plan, or read with LOCAL INDEX ROWID or GLOBAL INDEX ROWID.
Objects by Access Type
Shows the queried objects by Access Type as a donut chart. Each object is counted under the highest-risk Access Type used on it. The number of objects and SQL is shown next to the title. Selecting an item or legend entry on the chart shows only the objects of that Access Type in the Access Types by Object list below.
Access Types by Object
Shows the Access Type composition and performance metrics per object.
| Group | Column | Description |
|---|---|---|
Object | object, owner, type | Object name, schema, and type (TABLE, INDEX, and so on) |
High Risk / Caution / Normal | FULL, PART, SKIP, FFS, IDXF, RANGE, UNIQ, ROWID, Other | Number of steps per Access Type that accessed the object |
Composition | Breakdown | Access Type composition (stacked bar) |
Performance | SQL, Executions, LIO/exec, Elapsed(s) | Number of SQL referencing the object, execution count, Logical IO per execution, and cumulative elapsed time (seconds) |
Referencing SQL
When you select an object in the Access Types by Object list, the list of SQL that references the object is shown.
| Column | Description |
|---|---|
sql_id, plan_hash_value, query_text | SQL identifier and query text |
Access Type | How the object was accessed |
Partition | Partition accessed |
Index | Index used |
Cost, Cost Share | Cost of accessing the object and its share of the total SQL cost |
Executions, LIO/exec, Elapsed/exec(s), Elapsed(s) | Execution count, Logical IO per execution, elapsed time per execution, and cumulative elapsed time |
SQL Plan Detail
On the SQL Plan Detail tab, check the execution plan, execution plan history, performance trend, and changes in access methods per object for a single SQL. Select the Time and Instance options, enter the SQL identifier in the sql_id field, and click the button. Clicking the icon next to
sql_id on another tab also opens that SQL on the SQL Plan Detail tab.
The SQL summary (Module, Executions, Plans, Plan, Elapsed/exec, Cost) is shown at the top of the screen, and the details are in four sub-tabs below (Execution Plan, Plan History, Performance, Objects & Indexes).
Execution Plan
-
SQL Text: Shows the query text.
-
Bind Variables: Select Show bind capture to show the collected bind variable values.
-
Plan: Shows the selected execution plan as a tree. If there are multiple execution plans, select a
plan_hash_valuefrom the dropdown.Column Description IdStep number OperationOperation ObjectObject being accessed CostCost of the step RowsEstimated number of rows AccessAccess Type abbreviation of the step ( FULL,ROWID,IDXF, and so on) -
Predicate: Shows the condition clause of each step in the Line, Kind, Object, and Condition columns. Kind is access or filter.
Plan History
Shows the execution plans used in the query period as a timeline and a table.
| Column | Description |
|---|---|
plan_hash_value | Hash value of the execution plan |
Used | Period in which the execution plan was used |
Executions | Execution count |
LIO/exec | Logical IO per execution |
CPU/exec(s) | CPU time per execution (seconds) |
Elapsed/exec(s) | Elapsed time per execution (seconds) |
vs Best(s) | Difference in elapsed time per execution compared with the fastest execution plan (seconds) |
Added Load(s) | Additional cumulative elapsed time compared with using the fastest execution plan (seconds) |
Cost | Cost of the execution plan |
Plan Body | Whether the execution plan body was collected (saved / missing) |
Select one execution plan each in Before and After below the table to show the differences between the two execution plans side by side.
The agent saves the execution plan body only for sessions that ran for 5 seconds or longer. Execution plans whose body was not collected are shown as missing in Plan Body, and no content is shown on the comparison screen.
Performance
Shows the trend of the execution count (Execute Count) and average elapsed time (Elapse Time Avg) during the query period as charts.
Objects & Indexes
Shows how the access method of each object changed between two execution plans.
| Column | Description |
|---|---|
Object | Object name |
Type | Object type (TABLE, INDEX) |
Changed | Whether the access method changed |
Before | Access method in the previous execution plan |
After | Access method in the later execution plan |
Cost Share | Share of the object in the total cost |