Purpose
GV$SQL_AUDIT displays the statistics of each SQL request on all OBServer nodes, such as the source and execution status. This view is tenant-specific, and except for the system tenant, other tenants cannot perform cross-tenant queries.
Fields
| Field | Type | Nullable? | Description |
|---|---|---|---|
| SVR_IP | VARCHAR2(46) | NO | The IP address of the server. |
| SVR_PORT | NUMBER(38) | NO | The port number of the server. |
| REQUEST_ID | NUMBER(38) | NO | The ID of the request. |
| SQL_EXEC_ID | NUMBER(38) | NO | The ID of the current execution. |
| TRACE_ID | VARCHAR2(128) | NO | The trace ID of the statement. |
| SID | NUMBER(38) | NO | The ID of the session. |
| CLIENT_IP | VARCHAR2(46) | NO | |
| CLIENT_PORT | NUMBER(38) | NO | The port number of the client that sends the request. |
| TENANT_ID | NUMBER(38) | NO | The ID of the tenant that sends the request. |
| EFFECTIVE_TENANT_ID | NUMBER(38) | NO | The ID of the tenant. |
| TENANT_NAME | VARCHAR2(64) | NO | The name of the tenant that sends the request. |
| USER_ID | NUMBER(38) | NO | The ID of the user that sends the request. |
| USER_NAME | VARCHAR2(64) | NO | The name of the user that sends the request. |
| USER_GROUP | NUMBER(38) | YES | The ID of the resource group to which the user belongs. |
| USER_CLIENT_IP | VARCHAR2(46) | NO | The IP address of the client that sends the request. |
| DB_ID | NUMBER(38) | NO | The ID of the database. |
| DB_NAME | VARCHAR2(128) | NO | The name of the database. |
| SQL_ID | VARCHAR2(32) | NO | The ID of the SQL statement. |
| QUERY_SQL | CLOB | NO | The actual SQL statement. |
| PLAN_ID | NUMBER(38) | NO | The ID of the execution plan. |
| AFFECTED_ROWS | NUMBER(38) | NO | The number of rows affected. |
| RETURN_ROWS | NUMBER(38) | NO | The number of returned rows. |
| PARTITION_CNT | NUMBER(38) | NO | The number of partitions involved in this request. |
| RET_CODE | NUMBER(38) | NO | The return code of the execution. |
| QC_ID | NUMBER(38) | NO | The ID of the scheduler in the parallel execution scenario. |
| DFO_ID | NUMBER(38) | NO | The ID of the sub-plan being executed in the parallel execution scenario. |
| SQC_ID | NUMBER(38) | NO | The ID of the local coordinator in the parallel execution scenario. |
| WORKER_ID | NUMBER(38) | NO | The ID of the worker thread in the parallel execution scenario. |
| EVENT | VARCHAR2(64) | NO | The name of the wait event with the longest wait time. |
| P1TEXT | VARCHAR2(64) | NO | The description of the first parameter of the wait event. |
| P1 | NUMBER(38) | NO | The value of the first parameter of the wait event. |
| P2TEXT | VARCHAR2(64) | NO | The description of the second parameter of the wait event. |
| P2 | NUMBER(38) | NO | The value of the second parameter of the wait event. |
| P3TEXT | VARCHAR2(64) | NO | The description of the third parameter of the wait event. |
| P3 | NUMBER(38) | NO | The value of the third parameter of the wait event. |
| LEVEL | NUMBER(38) | NO | The level of the wait event. |
| WAIT_CLASS_ID | NUMBER(38) | NO | The ID of the class to which the wait event belongs. |
| WAIT_CLASS# | NUMBER(38) | NO | The subscript of the class to which the wait event belongs. |
| WAIT_CLASS | VARCHAR2(64) | NO | The name of the class to which the wait event belongs. |
| STATE | VARCHAR2(19) | NO | The state of the wait event. |
| WAIT_TIME_MICRO | NUMBER(38) | NO | The wait time of the wait event, in microseconds. |
| TOTAL_WAIT_TIME_MICRO | NUMBER(38) | NO | The total wait time during the execution, in microseconds. |
| TOTAL_WAITS | NUMBER(38) | NO | The total number of waits during the execution. |
| RPC_COUNT | NUMBER(38) | NO | The number of remote procedure calls (RPCs) sent. |
| PLAN_TYPE | NUMBER(38) | NO | The type of the execution plan. Valid values: 1: local execution plan (Local)2: remote execution plan (Remote)3: distributed execution plan (Distribute) |
| IS_INNER_SQL | NUMBER(38) | NO | Indicates whether the current request is an internal SQL request. |
| IS_EXECUTOR_RPC | NUMBER(38) | NO | Indicates whether the current request is an RPC request. |
| IS_HIT_PLAN | NUMBER(38) | NO | Indicates whether the plan cache is hit. |
| REQUEST_TIME | NUMBER(38) | NO | The starting time of execution. |
| ELAPSED_TIME | NUMBER(38) | NO | The total time taken from receiving the request to the completion of execution. |
| NET_TIME | NUMBER(38) | NO | The time taken from sending an RPC request to receiving the request. |
| NET_WAIT_TIME | NUMBER(38) | NO | The time taken from receiving the request to the request entering the queue. |
| QUEUE_TIME | NUMBER(38) | NO | The waiting time of the request in the queue. |
| DECODE_TIME | NUMBER(38) | NO | The time taken for decoding after the request leaves the queue. |
| GET_PLAN_TIME | NUMBER(38) | NO | The time taken from starting the process to obtaining the plan. |
| EXECUTE_TIME | NUMBER(38) | NO | The time taken for plan execution. |
| APPLICATION_WAIT_TIME | NUMBER(38) | NO | The total time taken for waiting for events of the application class. |
| CONCURRENCY_WAIT_TIME | NUMBER(38) | NO | The total time taken for waiting for events of the concurrency class. |
| USER_IO_WAIT_TIME | NUMBER(38) | NO | The total time taken for waiting for events of the user_io class. |
| SCHEDULE_TIME | NUMBER(38) | NO | The total time taken for waiting for events of the schedule class. |
| ROW_CACHE_HIT | NUMBER(38) | NO | The number of row cache hits. |
| BLOOM_FILTER_CACHE_HIT | NUMBER(38) | NO | The number of Bloom filter cache hits. |
| BLOCK_CACHE_HIT | NUMBER(38) | NO | The number of block cache hits. |
| BLOCK_INDEX_CACHE_HIT | NUMBER(38) | NO | The number of block index cache hits. |
| DISK_READS | NUMBER(38) | NO | The number of physical reads. |
| RETRY_CNT | NUMBER(38) | NO | The number of retries. |
| TABLE_SCAN | NUMBER(38) | NO | Indicates whether the request contains a full table scan. |
| CONSISTENCY_LEVEL | NUMBER(38) | NO | The consistency level. |
| MEMSTORE_READ_ROW_COUNT | NUMBER(38) | NO | The number of rows read in the MemStore. |
| SSSTORE_READ_ROW_COUNT | NUMBER(38) | NO | The number of rows consecutively read in the SSStore. |
| REQUEST_MEMORY_USED | NUMBER(38) | NO | The memory consumed by the request. |
| EXPECTED_WORKER_COUNT | NUMBER(38) | NO | The number of worker threads expected by the request. |
| USED_WORKER_COUNT | NUMBER(38) | NO | The number of worker threads used by the request. |
| SCHED_INFO | VARCHAR2(16384) | YES | The scheduling information about the request. |
| PS_STMT_ID | NUMBER(38) | NO | The ID of the prepared statement corresponding to the request. -1: indicates that the prepared statement (PS) protocol is not used in the SQL statement.-1: indicates that the PS protocol is used in the SQL statement, and it is the unique identifier returned by the PS protocol on the client for this statement. |
| TRANSACTION_HASH | NUMBER(38) | NO | The hash value of the transaction corresponding to the request. |
| REQUEST_TYPE | NUMBER(38) | NO | The type of the request. Valid values: |
| IS_BATCHED_MULTI_STMT | NUMBER(38) | NO | Indicates whether optimization has been performed for batch execution of multiple statements. |
| OB_TRACE_INFO | VARCHAR2(4096) | NO | The trace information configured by the user. |
| PLAN_HASH | NUMBER(38) | NO | The hash value of the execution plan. |
| PARAMS_VALUE | CLOB | NO | The PS-bound parameter value. |