Get execution plan for an SQL Statement
get
/database/performance/sql_statements/{sql_id}/plan
Returns all GV$SQL_PLAN records for a specified SQL_ID. A client requires SQL Administrator role to invoke this service.
Request
Supported Media Types
- application/json
Path Parameters
-
sql_id: string
SQL identifier.
Query Parameters
-
limit(optional): integer(int32)
The maximum number of records to return.
-
q(optional): string
Filtering is the process of limiting a collection resource by using a per-request dynamic filter definition across multiple page resources, where each page contains a subset of items found in the complete collection. Filtering enables efficient traversal of large collections.
Response
Supported Media Types
- application/json
200 Response
Execution plan for the specified SQL statement.
Root Schema : PerformanceSQLStatementPlanItem
Type:
object
Title:
PerformanceSQLStatementPlanItem
Describes the explain plan for an SQL Statement.
Show Source
-
count(optional):
integer(int32)
Total number of records in the current response.
-
hasMore(optional):
boolean
Indicates if there are more records to be retrieved.
-
items(optional):
array items
-
limit(optional):
integer(int32)
The actual page size limit on number of records applied by the server.
-
links(optional):
array links
-
offset(optional):
integer(int32)
The actual index from which the item resources are returned.
Nested Schema : Item4
Type:
object
Title:
Show Source
Item4
-
depth(optional):
integer(int32)
Depth (or level) of the operation in the tree. The root operation (statement) is level 0.
-
id(optional):
integer(int32)
A number assigned to each step in the execution plan.
-
operation(optional):
string
Name of the internal operation performed in this step (for example, TABLE ACCESS).
-
rows(optional):
string
The number of rows the optimizer is expecting the operation to produce each time it is called. Also known as E-Rows.
-
rowsourcetimes(optional):
integer(int32)
The number of times the SQL Statement is referenced in GV$ACTIVE_SESSION_HISTORY.