Note
- In V4.3.x, the view was introduced in V4.3.5.
- In V4.2.x, the view was introduced in V4.2.2.
Purpose
The DBA_WR_SQLSTAT view displays the basic performance statistics of the SQL statements executed in the current tenant. The statistics with _DELTA in the list indicate the incremental statistics from the last WR snapshot 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 |
| 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 cached SQL plans, this field indicates the type of the plan:
For cached PL objects, this field indicates the type of the PL object:
|
| MODULE | VARCHAR2(64) | YES | The application module when the statement was parsed for the first time |
| ACTION | VARCHAR2(64) | YES | The application action when the statement was parsed for the first time |
| PARSING_DB_ID | NUMBER(38) | NO | Database ID when the statement was parsed |
| PARSING_DB_NAME | VARCHAR2(128) | NO | Database name when the statement was parsed |
| PARSING_USER_ID | NUMBER(38) | NO | User ID when the statement was parsed |
| EXECUTIONS_TOTAL | NUMBER(38) | NO | Total number of executions of the plan in the plan cache |
| EXECUTIONS_DELTA | NUMBER(38) | NO | Increment of the total number of executions of the plan in the plan cache |
| DISK_READS_TOTAL | NUMBER(38) | NO | Total number of disk reads |
| DISK_READS_DELTA | NUMBER(38) | NO | Increment of the total number of disk reads |
| BUFFER_GETS_TOTAL | NUMBER(38) | NO | Total number of logical reads from the cache |
| BUFFER_GETS_DELTA | NUMBER(38) | NO | Increment of the total number of logical reads from the cache |
| ELAPSED_TIME_TOTAL | NUMBER(38) | NO | Total time consumed by the statement. For parallel execution scenarios, this value is the sum of the elapsed times of all execution threads. |
| ELAPSED_TIME_DELTA | NUMBER(38) | NO | Increment of the total time consumed by the statement |
| CPU_TIME_TOTAL | NUMBER(38) | NO | Total CPU time |
| CPU_TIME_DELTA | NUMBER(38) | NO | Increment of the total CPU time |
| CCWAIT_TOTAL | NUMBER(38) | NO | Total time consumed by concurrency-related wait events |
| CCWAIT_DELTA | NUMBER(38) | NO | Increment of the total time consumed by concurrency-related wait events |
| USERIO_WAIT_TOTAL | NUMBER(38) | NO | Total time consumed by I/O waits |
| USERIO_WAIT_DELTA | NUMBER(38) | NO | Increment of the total time consumed by I/O waits |
| APWAIT_TOTAL | NUMBER(38) | NO | Total time consumed by application-related wait events |
| APWAIT_DELTA | NUMBER(38) | NO | Increment of the total time consumed by application-related wait events |
| PHYSICAL_READ_REQUESTS_TOTAL | NUMBER(38) | NO | Total number of physical read requests |
| PHYSICAL_READ_REQUESTS_DELTA | NUMBER(38) | NO | Increment of the total number of physical read requests |
| PHYSICAL_READ_BYTES_TOTAL | NUMBER(38) | NO | Total number of bytes read physically |
| PHYSICAL_READ_BYTES_DELTA | NUMBER(38) | NO | Increment of the total number of bytes read physically |
| WRITE_THROTTLE_TOTAL | NUMBER(38) | NO | Total time throttled when writing to the MemStore |
| WRITE_THROTTLE_DELTA | NUMBER(38) | NO | Increment of the total time throttled when writing to the MemStore |
| ROWS_PROCESSED_TOTAL | NUMBER(38) | NO | Total number of rows processed by the statement |
| ROWS_PROCESSED_DELTA | NUMBER(38) | NO | Increment of the total number of rows processed by the statement |
| MEMSTORE_READ_ROWS_TOTAL | NUMBER(38) | NO | Total number of rows read from the MemStore |
| MEMSTORE_READ_ROWS_DELTA | NUMBER(38) | NO | Increment of the total number of rows read from the MemStore |
| MINOR_SSSTORE_READ_ROWS_TOTAL | NUMBER(38) | NO | Total number of rows read from the MINOR SSStore |
| MINOR_SSSTORE_READ_ROWS_DELTA | NUMBER(38) | NO | Increment of the total number of rows read from the MINOR SSStore |
| MAJOR_SSSTORE_READ_ROWS_TOTAL | NUMBER(38) | NO | Total number of rows read from the MAJOR SSStore |
| MAJOR_SSSTORE_READ_ROWS_DELTA | NUMBER(38) | NO | Increment of the total number of rows read from the MAJOR SSStore |
| RPC_TOTAL | NUMBER(38) | NO | Total number of RPCs |
| RPC_DELTA | NUMBER(38) | NO | Increment of the total number of RPCs |
| FETCHES_TOTAL | NUMBER(38) | NO | Total number of result set fetches |
| FETCHES_DELTA | NUMBER(38) | NO | Increment of the total number of result set fetches |
| RETRY_TOTAL | NUMBER(38) | NO | Total number of SQL retries |
| RETRY_DELTA | NUMBER(38) | NO | Increment of the total number of SQL retries |
| PARTITION_TOTAL | NUMBER(38) | NO | Total number of partitions scanned by the SQL statement |
| PARTITION_DELTA | NUMBER(38) | NO | Increment of the total number of partitions scanned by the SQL statement |
| NESTED_SQL_TOTAL | NUMBER(38) | NO | Total number of nested SQL statements executed, which is incremented by 1 each time a sub-SQL statement is executed |
| NESTED_SQL_DELTA | NUMBER(38) | NO | Increment of the total number of nested SQL statements executed |
| SOURCE_IP | VARCHAR2(46) | NO | IP address of the request source |
| SOURCE_PORT | NUMBER(38) | NO | Port number of the request source |
| ROUTE_MISS_TOTAL | NUMBER(38) | NO | Total number of times that requests are not routed to the target partitions since the OBServer node started
Note
|
| ROUTE_MISS_DELTA | NUMBER(38) | NO | Number of times that requests are not routed to the target partitions since the last WR snapshot was collected
Note
|
| FIRST_LOAD_TIME | TIMESTAMP(6) WITH LOCAL TIME ZONE | YES | Plan generation time
Note
|
| PLAN_CACHE_HIT_TOTAL | NUMBER(38) | NO | Total number of times that the plan cache was hit since the OBServer node started
Note
|
| PLAN_CACHE_HIT_DELTA | NUMBER(38) | NO | Number of times that the plan cache was hit since the last WR snapshot was collected
Note
|
Sample query
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: 07A3E8BC1FC1500B8E45AAB7FEDC9C57
PLAN_HASH: 12061525241142148803
PLAN_TYPE: 1
MODULE: NULL
ACTION: NULL
PARSING_DB_ID: 201001
PARSING_DB_NAME: oceanbase
PARSING_USER_ID: 200001
EXECUTIONS_TOTAL: 1
EXECUTIONS_DELTA: 1
DISK_READS_TOTAL: 0
DISK_READS_DELTA: 0
BUFFER_GETS_TOTAL: 0
BUFFER_GETS_DELTA: 0
ELAPSED_TIME_TOTAL: 2653
ELAPSED_TIME_DELTA: 2653
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: 0
PHYSICAL_READ_REQUESTS_DELTA: 0
PHYSICAL_READ_BYTES_TOTAL: 0
PHYSICAL_READ_BYTES_DELTA: 0
WRITE_THROTTLE_TOTAL: 0
WRITE_THROTTLE_DELTA: 0
ROWS_PROCESSED_TOTAL: 1
ROWS_PROCESSED_DELTA: 1
MEMSTORE_READ_ROWS_TOTAL: 12
MEMSTORE_READ_ROWS_DELTA: 12
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: 1
PARTITION_DELTA: 1
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: 09-DEC-24 11.21.03.975641 AM
PLAN_CACHE_HIT_TOTAL: 0
PLAN_CACHE_HIT_DELTA: 0
1 row in set (0.176 sec)