Note
This view is available starting with V4.2.2.
Purpose
The DBA_WR_SQLSTAT view displays basic performance statistics of SQL statements executed in the current tenant. Columns that contain _DELTA indicate the increment of the statistical values from the last WR snapshot collection to the current time.
Columns
Column |
Type |
Nullable? |
Description |
|---|---|---|---|
| SNAP_ID | NUMBER(38) | NO | Snapshot ID |
| SVR_IP | VARCHAR2(46) | NO | Node IP |
| SVR_PORT | NUMBER(38) | NO | Node port number |
| SQL_ID | VARCHAR2(32) | NO | SQL statement ID |
| PLAN_HASH | NUMBER(38) | NO | Hash value of the execution plan |
| PLAN_ID | NUMBER(38) | NO | Execution plan ID |
| PLAN_TYPE | NUMBER(38) | NO | For SQL plan cache, this field indicates the plan type:
For the PL object cache, this field indicates the type of the PL object:
|
| MODULE | VARCHAR2(64) | YES | The application Module when this statement was first parsed, viaDBMS_APPLICATION_INFO.SET_MODULEPackage settings |
| ACTION | VARCHAR2(64) | YES | The application Action when the statement was parsed for the first time, viaDBMS_APPLICATION_INFO.SET_ACTIONPackage settings |
| PARSING_DB_ID | NUMBER(38) | NO | Database ID during statement parsing |
| PARSING_DB_NAME | VARCHAR2(128) | NO | Database name during statement parsing |
| PARSING_USER_ID | NUMBER(38) | NO | User ID during statement parsing |
| EXECUTIONS_TOTAL | NUMBER(38) | NO | Total number of executions of this plan in the plan cache |
| EXECUTIONS_DELTA | NUMBER(38) | NO | Increment of the total number of executions of this plan in the plan cache |
| DISK_READS_TOTAL | NUMBER(38) | NO | Total number of disk reads |
| DISK_READS_DELTA | NUMBER(38) | NO | Increment in disk reads |
| BUFFER_GETS_TOTAL | NUMBER(38) | NO | Total number of logical reads from cache |
| BUFFER_GETS_DELTA | NUMBER(38) | NO | Increment in the number of logical reads from the cache |
| ELAPSED_TIME_TOTAL | NUMBER(38) | NO | The total time consumed by this statement. In parallel execution scenarios, this value is the cumulative value for each execution thread. |
| ELAPSED_TIME_DELTA | NUMBER(38) | NO | Incremental time consumed by this statement |
| CPU_TIME_TOTAL | NUMBER(38) | NO | Total CPU time consumed |
| CPU_TIME_DELTA | NUMBER(38) | NO | Increment of total CPU time consumed |
| CCWAIT_TOTAL | NUMBER(38) | NO | Total time consumed by concurrency wait events |
| CCWAIT_DELTA | NUMBER(38) | NO | Increment in total time spent on concurrency wait events |
| USERIO_WAIT_TOTAL | NUMBER(38) | NO | Total time spent waiting for I/O |
| USERIO_WAIT_DELTA | NUMBER(38) | NO | Incremental total duration of I/O waits |
| APWAIT_TOTAL | NUMBER(38) | NO | Total time consumed by application wait events |
| APWAIT_DELTA | NUMBER(38) | NO | Increment of the total time consumed by application-type wait events |
| PHYSICAL_READ_REQUESTS_TOTAL | NUMBER(38) | NO | Total number of physical read requests |
| PHYSICAL_READ_REQUESTS_DELTA | NUMBER(38) | NO | Increment in the number of physical read requests |
| PHYSICAL_READ_BYTES_TOTAL | NUMBER(38) | NO | Total bytes read physically |
| PHYSICAL_READ_BYTES_DELTA | NUMBER(38) | NO | Increment in physical read bytes |
| WRITE_THROTTLE_TOTAL | NUMBER(38) | NO | Total time throttled when writing to MemStore |
| WRITE_THROTTLE_DELTA | NUMBER(38) | NO | Increment of the total time throttled when writing to MemStore |
| ROWS_PROCESSED_TOTAL | NUMBER(38) | NO | Total number of rows processed by the statement |
| ROWS_PROCESSED_DELTA | NUMBER(38) | NO | Increment in the total number of rows processed by the statement |
| MEMSTORE_READ_ROWS_TOTAL | NUMBER(38) | NO | Total number of rows read from MemStore |
| MEMSTORE_READ_ROWS_DELTA | NUMBER(38) | NO | Increment in the total number of rows read from MemStore |
| MINOR_SSSTORE_READ_ROWS_TOTAL | NUMBER(38) | NO | Total number of rows read from MINOR SSStore |
| MINOR_SSSTORE_READ_ROWS_DELTA | NUMBER(38) | NO | Increment in the total number of rows read from MINOR SSStore |
| MAJOR_SSSTORE_READ_ROWS_TOTAL | NUMBER(38) | NO | Total number of rows read from MAJOR SSStore |
| MAJOR_SSSTORE_READ_ROWS_DELTA | NUMBER(38) | NO | Increment in the total number of rows read from MAJOR SSStore |
| RPC_TOTAL | NUMBER(38) | NO | Total number of RPCs |
| RPC_DELTA | NUMBER(38) | NO | Increment in the number of RPC calls |
| FETCHES_TOTAL | NUMBER(38) | NO | Total number of times result sets are retrieved |
| FETCHES_DELTA | NUMBER(38) | NO | Increment in the number of times the result set was obtained |
| RETRY_TOTAL | NUMBER(38) | NO | Total number of SQL retries |
| RETRY_DELTA | NUMBER(38) | NO | Increment in the number of SQL retries |
| PARTITION_TOTAL | NUMBER(38) | NO | Total number of partitions scanned during SQL execution |
| PARTITION_DELTA | NUMBER(38) | NO | Increment in the number of partitions scanned during SQL execution |
| NESTED_SQL_TOTAL | NUMBER(38) | NO | Total number of nested SQL executions, incremented by 1 for each additional sub-SQL execution |
| NESTED_SQL_DELTA | NUMBER(38) | NO | Increment of nested SQL execution |
| SOURCE_IP | VARCHAR2(46) | NO | Request source IP |
| SOURCE_PORT | NUMBER(38) | NO | Port number of the request source |
| ROUTE_MISS_TOTAL | NUMBER | NO | Total number of times the requested partition was not correctly hit since the execution plan was generated |
| ROUTE_MISS_DELTA | NUMBER | NO | Total number of times the request partition was not correctly hit since the last WR snapshot collection |
| FIRST_LOAD_TIME | TIMESTAMP(6) | YES | Execution plan generation time |
| PLAN_CACHE_HIT_TOTAL | NUMBER | NO | Total number of Plan Cache hits since the execution plan was generated |
| PLAN_CACHE_HIT_DELTA | NUMBER | NO | Number of times the Plan Cache has been hit since the last WR snapshot collection |
| MUTI_QUERY_TOTAL | NUMBER | NO | Number of times this SQL has been in Muti Query since the execution plan was generated
NoteFor V4.2.5, this field was introduced starting from V4.2.5 BP7. |
| MUTI_QUERY_DELTA | NUMBER | NO | Number of times this SQL has been in Muti Query since the last WR snapshot collection
NoteFor V4.2.5, this field was introduced starting from V4.2.5 BP7. |
| MUTI_QUERY_BATCH_TOTAL | NUMBER | NO | Number of times this SQL Batch has been executed since the execution plan was generated
NoteFor V4.2.5, this field was introduced starting from V4.2.5 BP7. |
| MUTI_QUERY_BATCH_DELTA | NUMBER | NO | Number of times this SQL Batch has been executed since the last WR snapshot collection
NoteFor V4.2.5, this field was introduced starting from V4.2.5 BP7. |
| FULL_TABLE_SCAN_TOTAL | NUMBER | NO | The number of full table scans performed by the SQL since the execution plan was generated
NoteFor V4.2.5, this field was introduced starting from V4.2.5 BP7. |
| FULL_TABLE_SCAN_DELTA | NUMBER | NO | The number of full table scans by this SQL since the last WR snapshot collection
NoteFor V4.2.5, this field was introduced starting from V4.2.5 BP7. |
| ERROR_COUNT_TOTAL | NUMBER | NO | Number of times this SQL reported errors since the execution plan was generated
NoteFor V4.2.5, this field was introduced starting from V4.2.5 BP7. |
| ERROR_COUNT_DELTA | NUMBER | NO | Number of times this SQL has reported errors since the last WR snapshot collection
NoteFor V4.2.5, this field was introduced starting from V4.2.5 BP7. |
Sample query
Query the basic performance statistics of SQL statements executed in the current tenant and display the first record.
obclient [SYS]> SELECT * FROM SYS.DBA_WR_SQLSTAT WHERE ROWNUM = 1\G
The query result is as follows:
*************************** 1. row ***************************
SNAP_ID: 1
SVR_IP: xx.xx.xx.xx
SVR_PORT: 2882
SQL_ID: 056E37B2111B414A8B917B1C29F3C9F6
PLAN_HASH: 9282102774431564901
PLAN_TYPE: 1
MODULE: NULL
ACTION: NULL
PARSING_DB_ID: 201001
PARSING_DB_NAME: oceanbase
PARSING_USER_ID: 200001
EXECUTIONS_TOTAL: 5
EXECUTIONS_DELTA: 5
DISK_READS_TOTAL: 1
DISK_READS_DELTA: 1
BUFFER_GETS_TOTAL: 1
BUFFER_GETS_DELTA: 1
ELAPSED_TIME_TOTAL: 3364
ELAPSED_TIME_DELTA: 3364
CPU_TIME_TOTAL: 0
CPU_TIME_DELTA: 0
CCWAIT_TOTAL: 0
CCWAIT_DELTA: 0
USERIO_WAIT_TOTAL: 0
USERIO_WAIT_DELTA: 0
APWAIT_TOTAL: 0
APWAIT_DELTA: 0
PHYSICAL_READ_REQUESTS_TOTAL: 1
PHYSICAL_READ_REQUESTS_DELTA: 1
PHYSICAL_READ_BYTES_TOTAL: 193
PHYSICAL_READ_BYTES_DELTA: 193
WRITE_THROTTLE_TOTAL: 0
WRITE_THROTTLE_DELTA: 0
ROWS_PROCESSED_TOTAL: 0
ROWS_PROCESSED_DELTA: 0
MEMSTORE_READ_ROWS_TOTAL: 0
MEMSTORE_READ_ROWS_DELTA: 0
MINOR_SSSTORE_READ_ROWS_TOTAL: 0
MINOR_SSSTORE_READ_ROWS_DELTA: 0
MAJOR_SSSTORE_READ_ROWS_TOTAL: 0
MAJOR_SSSTORE_READ_ROWS_DELTA: 0
RPC_TOTAL: 0
RPC_DELTA: 0
FETCHES_TOTAL: 0
FETCHES_DELTA: 0
RETRY_TOTAL: 0
RETRY_DELTA: 0
PARTITION_TOTAL: 5
PARTITION_DELTA: 5
NESTED_SQL_TOTAL: 0
NESTED_SQL_DELTA: 0
SOURCE_IP: xx.xx.xx.xx
SOURCE_PORT: 2882
ROUTE_MISS_TOTAL: 0
ROUTE_MISS_DELTA: 0
FIRST_LOAD_TIME: 15-OCT-25 11.15.20.963356 AM
PLAN_CACHE_HIT_TOTAL: 4
PLAN_CACHE_HIT_DELTA: 4
MUTI_QUERY_TOTAL: 0
MUTI_QUERY_DELTA: 0
MUTI_QUERY_BATCH_TOTAL: 0
MUTI_QUERY_BATCH_DELTA: 0
FULL_TABLE_SCAN_TOTAL: 0
FULL_TABLE_SCAN_DELTA: 0
ERROR_COUNT_TOTAL: 0
ERROR_COUNT_DELTA: 0
1 row in set
