Get statistics for all SQL statements
get
/database/performance/sql_statements/
Oracle Tuning Pack licence is required for this service. Returns data from GV$SQL with GV$SQL_MONITOR timing data. A client requires SQL Administrator role to invoke this service.
Request
Query Parameters
-
limit: integer(int32)
The maximum number of records to return.
-
q:
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.Examples
There's no request body for this operation.
Back to TopResponse
Supported Media Types
- application/json
200 Response
Description of all SQL statements in the database.
Root Schema : PerformanceSQLStatements
Type:
Show Source
object
-
count: integer
Total number of records in the current response.
-
hasMore: boolean
Indicates if there are more records to be retrieved.
-
items: array
items
-
limit: integer
The actual page size limit on number of records applied by the server.
-
links: array
links
-
offset: integer
The actual index from which the item resources are returned.
Nested Schema : items
Type:
Show Source
array
-
Array of:
object PerformanceSQLStatementsItem
This object describes an SQL statement. The list of attributes may vary depending on database version.
Nested Schema : PerformanceSQLStatementsItem
Type:
object
This object describes an SQL statement. The list of attributes may vary depending on database version.
Show Source
-
con_id: integer
The ID of the container to which the data pertains.
-
cpu_time: number
Sum of total CPU time; updated as the statement executes.
-
duration: integer
Indicates the length of time the SQL statement has been running for. Calculated based on SQL_EXEC_START and LAST_REFRESH_TIME from GV$SQL_MONITOR.
-
elapsed_time: integer
Elapsed time (in microseconds); updated as the statement executes.
-
end_time: string
When the status is 'DONE (ALL ROWS)' this is the LAST_REFRESH_TIME value from GV$SQL_MONITOR.
-
instance_dop: string
Distinct number of instances that the SQL statement executed compared with the logical parallel execution server process number executing (or having executed) the statement being monitored.
-
io_time: number
Sum of total User I/O Wait Time; updated as the statement executes
-
links: array
links
-
session_id: integer
Session identifier executing (or having executed) the SQL statement being monitored.
-
session_serial: integer
Session serial number executing the statement being monitored.
-
sql_exec_id: integer
SQL execution identifier; NULL if SQL_ID is NULL or if the execution of that SQL has not yet started.
-
sql_exec_start: string
Time when the execution started. Part of the execution key for identifying a single record in GV$SQL_MONITOR.
-
sql_fulltext: string
All characters of the SQL text for the current cursor.
-
sql_id: string
SQL identifier of the statement.
-
start_time: string
Time when the execution started
-
status: string
SQL execution status.