Workload Repository (WR) periodically collects data from performance views. It persists and displays the collected active session history (ASH) data, statistics, wait events, and SQL execution information.
Query historical session data
Query the
oceanbase.CDB_WR_ACTIVE_SESSION_HISTORYview for persisted ASH data of all tenants.obclient [oceanbase]> SELECT * FROM oceanbase.CDB_WR_ACTIVE_SESSION_HISTORY limit 1;The return result is as follows:
+------------+-----------+---------+----------------+----------+-----------+---------------+----------------------------+---------+--------------+---------------+--------+------------------------------------+----------+----------+-------------+------+------+------+------------------+------------+----------+-------------+---------------+-----------------+------------------+-----------------+------------------+---------------+-----------------+------------------+-------------------------+----------------+-----------------------------+--------+--------+-----------+-----------+---------+---------------+-------------------+------------------+------------------+----------------------+--------------------+-----------------------+---------------------------+-----------------------------+-----------------+---------------------+-----------------------+ | CLUSTER_ID | TENANT_ID | SNAP_ID | SVR_IP | SVR_PORT | SAMPLE_ID | SESSION_ID | SAMPLE_TIME | USER_ID | SESSION_TYPE | SESSION_STATE | SQL_ID | TRACE_ID | EVENT_NO | EVENT_ID | TIME_WAITED | P1 | P2 | P3 | SQL_PLAN_LINE_ID | TIME_MODEL | IN_PARSE | IN_PL_PARSE | IN_PLAN_CACHE | IN_SQL_OPTIMIZE | IN_SQL_EXECUTION | IN_PX_EXECUTION | IN_SEQUENCE_LOAD | IN_COMMITTING | IN_STORAGE_READ | IN_STORAGE_WRITE | IN_REMOTE_DAS_EXECUTION | IN_FILTER_ROWS | PROGRAM | MODULE | ACTION | CLIENT_ID | BACKTRACE | PLAN_ID | TM_DELTA_TIME | TM_DELTA_CPU_TIME | TM_DELTA_DB_TIME | TOP_LEVEL_SQL_ID | IN_PLSQL_COMPILATION | IN_PLSQL_EXECUTION | PLSQL_ENTRY_OBJECT_ID | PLSQL_ENTRY_SUBPROGRAM_ID | PLSQL_ENTRY_SUBPROGRAM_NAME | PLSQL_OBJECT_ID | PLSQL_SUBPROGRAM_ID | PLSQL_SUBPROGRAM_NAME | +------------+-----------+---------+----------------+----------+-----------+---------------+----------------------------+---------+--------------+---------------+--------+------------------------------------+----------+----------+-------------+------+------+------+------------------+------------+----------+-------------+---------------+-----------------+------------------+-----------------+------------------+---------------+-----------------+------------------+-------------------------+----------------+-----------------------------+--------+--------+-----------+-----------+---------+---------------+-------------------+------------------+------------------+----------------------+--------------------+-----------------------+---------------------------+-----------------------------+-----------------+---------------------+-----------------------+ | 40001 | 1 | 1 | xx.xx.xx.xx | 28824 | 90 | 1748051689472 | 2024-01-05 14:32:42.111942 | 0 | 1 | ON CPU | | Y70980BA1CCFB-00060E2D0029C856-0-0 | 0 | -1 | 0 | 0 | 0 | 0 | NULL | 0 | N | N | N | N | N | N | N | N | N | N | N | N | RPC PROCESS (T1_L0_G0)_ 257 | NULL | NULL | NULL | NULL | 0 | 0 | 0 | 0 | NULL | N | N | NULL | NULL | NULL | NULL | NULL | NULL | +------------+-----------+---------+----------------+----------+-----------+---------------+----------------------------+---------+--------------+---------------+--------+------------------------------------+----------+----------+-------------+------+------+------+------------------+------------+----------+-------------+---------------+-----------------+------------------+-----------------+------------------+---------------+-----------------+------------------+-------------------------+----------------+-----------------------------+--------+--------+-----------+-----------+---------+---------------+-------------------+------------------+------------------+----------------------+--------------------+-----------------------+---------------------------+-----------------------------+-----------------+---------------------+-----------------------+ 1 row in set (0.097 sec)The following table describes the columns.
Column Description CLUSTER_ID The ID of the cluster. TENANT_ID The ID of the tenant. SNAP_ID The ID of the snapshot. SVR_IP The IP address of the OBServer node. SVR_PORT The port number of the OBServer node. SAMPLE_ID The ID of the sample. SESSION_ID The ID of the sampled session. SAMPLE_TIME The sampling time. USER_ID The ID of the user whose session is sampled. SESSION_TYPE The type of the session. Valid values: N:FOREGROUND, which indicates a foreground session, namely a user session.Y:BACKGROUND, which indicates a background session.
SESSION_STATE The status of the session when being sampled. Valid values: EVENT_NO == 0:ON CPUindicates that the SQL logic is being executed without waiting.EVENT_NO ≠ 0:WAITTINGindicates that the session is waiting. The wait details are provided in theEVENTcolumn.
SQL_ID The SQL ID. TRACE_ID The trace ID. EVENT_NO The internal number of the wait event, which is used for join query with other tables. TIME_WAITED The total wait time of the wait event, in microseconds. P1 The value of the first parameter of the wait event. P2 The value of the second parameter of the wait event. P3 The value of the third parameter of the wait event. SQL_PLAN_LINE_ID The ID of the SQL operator during sampling. If no operator is used, the value is NULL.TIME_MODEL The time model. IN_PARSE Indicates whether SQL parsing is being performed in the session during sampling. IN_PL_PARSE Indicates whether SQL PL parsing is being performed in the session during sampling. IN_PLAN_CACHE Indicates whether plan caching is being performed in the session during sampling. IN_SQL_OPTIMIZE Indicates whether SQL tuning is being performed in the session during sampling. IN_SQL_EXECUTION Indicates whether an SQL statement is being executed in the session during sampling. IN_PX_EXECUTION Indicates whether parallel SQL execution is being performed in the session during sampling. If the current session is in this state, it must also be in the IN_SQL_EXECUTIONstate.IN_SEQUENCE_LOAD Indicates whether values are being generated for an auto-increment column or a sequence in the session during sampling. IN_COMMITTING Indicates whether the current sampling point is in the transaction commit phase. IN_STORAGE_READ Indicates whether the current sampling point is in the storage read phase. IN_STORAGE_WRITE Indicates whether the current sampling point is in the storage write phase. IN_REMOTE_DAS_EXECUTION Indicates whether the current sampling point is in the phase of remote execution by using data access service (DAS). MODULE The MODULEvalue recorded during session sampling.ACTION The ACTIONvalue recorded during session sampling.CLIENT_ID The CLIENT_IDvalue recorded during session sampling.BACKTRACE An auxiliary debugging column, which records the code call stack when an event occurs. PLAN_ID The plan ID of the sampled SQL statement in the plan cache, which is used to associate the sampling point with the plan. TM_DELTA_TIME The interval for calculating the time model, in microseconds. TM_DELTA_CPU_TIME The amount of CPU time consumed during the previous interval specified by TM_DELTA_TIME.TM_DELTA_DB_TIME The amount of time spent on database calls during the previous interval specified by TM_DELTA_TIME.TOP_LEVEL_SQL_ID The top-level SQL ID. IN_PLSQL_COMPILATION Indicates whether PL compilation is in progress. Valid values: YandN.IN_PLSQL_EXECUTION Indicates whether PL execution is in progress. Valid values: YandN.PLSQL_ENTRY_OBJECT_ID The ID of the top-level PL object. PLSQL_ENTRY_SUBPROGRAM_ID The ID of the top-level PL subprogram. PLSQL_ENTRY_SUBPROGRAM_NAME The name of the top-level PL subprogram. PLSQL_OBJECT_ID The ID of the PL object being executed. PLSQL_SUBPROGRAM_ID The ID of the PL subprogram being executed. PLSQL_SUBPROGRAM_NAME The name of the PL subprogram being executed. For more information about the
oceanbase.CDB_WR_ACTIVE_SESSION_HISTORYview, see oceanbase.CDB_WR_ACTIVE_SESSION_HISTORY.Query the
oceanbase.DBA_WR_ACTIVE_SESSION_HISTORYview for persisted ASH data of the current tenant.obclient [oceanbase]> SELECT * FROM oceanbase.DBA_WR_ACTIVE_SESSION_HISTORY limit 1;The return result is as follows:
+------------+-----------+---------+----------------+----------+-----------+---------------+----------------------------+---------+--------------+---------------+--------+-------------------------+----------+----------+-------------+------+------+------+------------------+------------+----------+-------------+---------------+-----------------+------------------+-----------------+------------------+---------------+-----------------+------------------+-------------------------+----------------+---------------+--------+--------+-----------+-----------+---------+---------------+-------------------+------------------+------------------+----------------------+--------------------+-----------------------+---------------------------+-----------------------------+-----------------+---------------------+-----------------------+ | CLUSTER_ID | TENANT_ID | SNAP_ID | SVR_IP | SVR_PORT | SAMPLE_ID | SESSION_ID | SAMPLE_TIME | USER_ID | SESSION_TYPE | SESSION_STATE | SQL_ID | TRACE_ID | EVENT_NO | EVENT_ID | TIME_WAITED | P1 | P2 | P3 | SQL_PLAN_LINE_ID | TIME_MODEL | IN_PARSE | IN_PL_PARSE | IN_PLAN_CACHE | IN_SQL_OPTIMIZE | IN_SQL_EXECUTION | IN_PX_EXECUTION | IN_SEQUENCE_LOAD | IN_COMMITTING | IN_STORAGE_READ | IN_STORAGE_WRITE | IN_REMOTE_DAS_EXECUTION | IN_FILTER_ROWS | PROGRAM | MODULE | ACTION | CLIENT_ID | BACKTRACE | PLAN_ID | TM_DELTA_TIME | TM_DELTA_CPU_TIME | TM_DELTA_DB_TIME | TOP_LEVEL_SQL_ID | IN_PLSQL_COMPILATION | IN_PLSQL_EXECUTION | PLSQL_ENTRY_OBJECT_ID | PLSQL_ENTRY_SUBPROGRAM_ID | PLSQL_ENTRY_SUBPROGRAM_NAME | PLSQL_OBJECT_ID | PLSQL_SUBPROGRAM_ID | PLSQL_SUBPROGRAM_NAME | +------------+-----------+---------+----------------+----------+-----------+---------------+----------------------------+---------+--------------+---------------+--------+-------------------------+----------+----------+-------------+------+------+------+------------------+------------+----------+-------------+---------------+-----------------+------------------+-----------------+------------------+---------------+-----------------+------------------+-------------------------+----------------+---------------+--------+--------+-----------+-----------+---------+---------------+-------------------+------------------+------------------+----------------------+--------------------+-----------------------+---------------------------+-----------------------------+-----------------+---------------------+-----------------------+ | 40001 | 1002 | 1 | xx.xx.xx.xx | 28824 | 640 | 2830383448064 | 2024-01-05 14:34:28.277178 | 0 | 1 | ON CPU | | Y0-0000000000000000-0-0 | 0 | -1 | 0 | 0 | 0 | 0 | NULL | 0 | N | N | N | N | N | N | N | N | N | N | N | N | T1002_ObTimer | NULL | NULL | NULL | NULL | 0 | 825 | 825 | 825 | NULL | N | N | NULL | NULL | NULL | NULL | NULL | NULL | +------------+-----------+---------+----------------+----------+-----------+---------------+----------------------------+---------+--------------+---------------+--------+-------------------------+----------+----------+-------------+------+------+------+------------------+------------+----------+-------------+---------------+-----------------+------------------+-----------------+------------------+---------------+-----------------+------------------+-------------------------+----------------+---------------+--------+--------+-----------+-----------+---------+---------------+-------------------+------------------+------------------+----------------------+--------------------+-----------------------+---------------------------+-----------------------------+-----------------+---------------------+-----------------------+ 1 row in set (0.095 sec)The following table describes the columns.
Column Description CLUSTER_ID The ID of the cluster. TENANT_ID The ID of the tenant. SNAP_ID The ID of the snapshot. SVR_IP The IP address of the OBServer node. SVR_PORT The port number of the OBServer node. SAMPLE_ID The ID of the sample. SESSION_ID The ID of the sampled session. SAMPLE_TIME The sampling time. USER_ID The ID of the user whose session is sampled. SESSION_TYPE The type of the session. Valid values: N:FOREGROUND, which indicates a foreground session, namely a user session.Y:BACKGROUND, which indicates a background session.
SESSION_STATE The status of the session when being sampled. Valid values: EVENT_NO == 0:ON CPUindicates that the SQL logic is being executed without waiting.EVENT_NO ≠ 0:WAITTINGindicates that the session is waiting. The wait details are provided in theEVENTcolumn.
SQL_ID The SQL ID. TRACE_ID The trace ID. EVENT_NO The internal number of the wait event, which is used for join query with other tables. TIME_WAITED The total wait time of the wait event, in microseconds. P1 The value of the first parameter of the wait event. P2 The value of the second parameter of the wait event. P3 The value of the third parameter of the wait event. SQL_PLAN_LINE_ID The ID of the SQL operator during sampling. If no operator is used, the value is NULL.TIME_MODEL The time model. IN_PARSE Indicates whether SQL parsing is being performed in the session during sampling. IN_PL_PARSE Indicates whether SQL PL parsing is being performed in the session during sampling. IN_PLAN_CACHE Indicates whether plan caching is being performed in the session during sampling. IN_SQL_OPTIMIZE Indicates whether SQL tuning is being performed in the session during sampling. IN_SQL_EXECUTION Indicates whether an SQL statement is being executed in the session during sampling. IN_PX_EXECUTION Indicates whether parallel SQL execution is being performed in the session during sampling. If the current session is in this state, it must also be in the IN_SQL_EXECUTIONstate.IN_SEQUENCE_LOAD Indicates whether values are being generated for an auto-increment column or a sequence in the session during sampling. IN_COMMITTING Indicates whether the current sampling point is in the transaction commit phase. IN_STORAGE_READ Indicates whether the current sampling point is in the storage read phase. IN_STORAGE_WRITE Indicates whether the current sampling point is in the storage write phase. IN_REMOTE_DAS_EXECUTION Indicates whether the current sampling point is in the phase of remote execution by using DAS. MODULE The MODULEvalue recorded during session sampling.ACTION The ACTIONvalue recorded during session sampling.CLIENT_ID The CLIENT_IDvalue recorded during session sampling.BACKTRACE An auxiliary debugging column, which records the code call stack when an event occurs. PLAN_ID The plan ID of the sampled SQL statement in the plan cache, which is used to associate the sampling point with the plan. TM_DELTA_TIME The interval for calculating the time model, in microseconds. TM_DELTA_CPU_TIME The amount of CPU time consumed during the previous interval specified by TM_DELTA_TIME.TM_DELTA_DB_TIME The amount of time spent on database calls during the previous interval specified by TM_DELTA_TIME.TOP_LEVEL_SQL_ID The top-level SQL ID. IN_PLSQL_COMPILATION Indicates whether PL compilation is in progress. Valid values: YandN.IN_PLSQL_EXECUTION Indicates whether PL execution is in progress. Valid values: YandN.PLSQL_ENTRY_OBJECT_ID The ID of the top-level PL object. PLSQL_ENTRY_SUBPROGRAM_ID The ID of the top-level PL subprogram. PLSQL_ENTRY_SUBPROGRAM_NAME The name of the top-level PL subprogram. PLSQL_OBJECT_ID The ID of the PL object being executed. PLSQL_SUBPROGRAM_ID The ID of the PL subprogram being executed. PLSQL_SUBPROGRAM_NAME The name of the PL subprogram being executed. For more information about the
DBA_WR_ACTIVE_SESSION_HISTORYview, see oceanbase.DBA_WR_ACTIVE_SESSION_HISTORY and DBA_WR_ACTIVE_SESSION_HISTORY.Query the
GV$ACTIVE_SESSION_HISTORYview for ASH data of all tenants.obclient [oceanbase]> SELECT * FROM oceanbase.GV$ACTIVE_SESSION_HISTORY limit 1\GThe query result is as follows:
*************************** 1. row *************************** SVR_IP: xx.xx.xx.xx SVR_PORT: 2882 SAMPLE_ID: 156 SAMPLE_TIME: 2024-09-12 14:49:22 CON_ID: 1002 USER_ID: 200001 SESSION_ID: 3221489366 SESSION_TYPE: FOREGROUND SESSION_STATE: WAITING SQL_ID: 7436ED675ADD0F8C14411CC455CC7B49 PLAN_ID: 2868 TRACE_ID: YBXXXXXXXXX-XXXXXXXXXX-0-0 EVENT: px loop condition wait EVENT_NO: 56 EVENT_ID: NULL P1TEXT: address P1: 139616155807696 P2TEXT: P2: 0 P3TEXT: P3: 0 WAIT_CLASS: CONCURRENCY WAIT_CLASS_ID: 104 TIME_WAITED: 1059 SQL_PLAN_LINE_ID: 3 GROUP_ID: NULL TX_ID: NULL BLOCKING_SESSION_ID: NULL IN_PARSE: N IN_PL_PARSE: N IN_PLAN_CACHE: N IN_SQL_OPTIMIZE: N IN_SQL_EXECUTION: N IN_PX_EXECUTION: Y IN_SEQUENCE_LOAD: N IN_COMMITTING: N IN_STORAGE_READ: N IN_STORAGE_WRITE: N IN_REMOTE_DAS_EXECUTION: N IN_FILTER_ROWS: N PROGRAM: NULL MODULE: NULL ACTION: NULL CLIENT_ID: NULL BACKTRACE: NULL TM_DELTA_TIME: NULL TM_DELTA_CPU_TIME: NULL TM_DELTA_DB_TIME: NULL TOP_LEVEL_SQL_ID: NULL IN_PLSQL_COMPILATION: N IN_PLSQL_EXECUTION: N PLSQL_ENTRY_OBJECT_ID: NULL PLSQL_ENTRY_SUBPROGRAM_ID: NULL PLSQL_ENTRY_SUBPROGRAM_NAME: NULL PLSQL_OBJECT_ID: NULL PLSQL_SUBPROGRAM_ID: NULL PLSQL_SUBPROGRAM_NAME: NULL 1 row in set (0.001 sec)The following table describes the columns.
Column Description SVR_IP The IP address of the server to which the sample belongs. SVR_PORT The port number of the server to which the sample belongs. SAMPLE_ID The unique ID of the sample. SAMPLE_TIME The sampling time. CON_ID The ID of the tenant. USER_ID The ID of the user whose session is sampled. SESSION_ID The ID of the sampled session. SESSION_TYPE The type of the session. Valid values: FOREGROUND: indicates a foreground session, namely a user session.BACKGROUND: indicates a background session, which is not supported for now.
SESSION_STATE The session status. Valid values: ON CPU: The SQL logic is being executed without waiting.WAITING: The session is waiting. The wait details are provided in theEVENTcolumn.
SQL_ID The SQL ID. PLAN_ID The plan ID of the sampled SQL statement in the plan cache, which is used to associate the sampling point with the plan. TRACE_ID The trace ID of the operator. EVENT The description of the wait event. EVENT_NO The internal number of the wait event, which is used for join query with other tables. EVENT_ID The ID of the current wait event. P1TEXT The name of the first parameter of the wait event. The parameter name varies with the event. P1 The value of the first parameter of the wait event. P2TEXT The name of the second parameter of the wait event. The parameter name varies with the event. P2 The value of the second parameter of the wait event. P3TEXT The name of the third parameter of the wait event. The parameter name varies with the event. P3 The value of the third parameter of the wait event. WAIT_CLASS The class of the wait event. WAIT_CLASS_ID The ID of the class of the wait event, which is used for join query with other tables. TIME_WAITED The total wait time of the wait event, in microseconds. SQL_PLAN_LINE_ID The ID of the SQL operator in the SQL plan when the session is being sampled. IN_PARSE Indicates whether SQL parsing is being performed in the session during sampling. IN_PL_PARSE Indicates whether SQL PL parsing is being performed in the session during sampling. IN_PLAN_CACHE Indicates whether plan caching is being performed in the session during sampling. IN_SQL_OPTIMIZE Indicates whether SQL parsing and tuning are being performed in the session during sampling. IN_SQL_EXECUTION Indicates whether an SQL statement is being executed in the session during sampling. IN_PX_EXECUTION Indicates whether parallel SQL execution is being performed in the session during sampling. If the session is in this state, it must also be in the IN_SQL_EXECUTIONstate.IN_SEQUENCE_LOAD Indicates whether values are being generated for an auto-increment column or a sequence in the session during sampling. IN_COMMITTING Indicates whether the current sampling point is in the transaction commit phase. IN_STORAGE_READ Indicates whether the current sampling point is in the storage read phase. IN_STORAGE_WRITE Indicates whether the current sampling point is in the storage write phase. IN_REMOTE_DAS_EXECUTION Indicates whether the current sampling point is in the phase of remote execution by using DAS. IN_FILTER_ROWS Indicates whether the current sampling point is in the storage pushdown phase. PROGRAM The name of the program being executed at the current sampling point. - For a background thread, the value is the name of the thread, such as
observerorWrTimer. - For a foreground thread:
- The value is in the format of
user@client_ip (thread_name)for a general request. - The value is in the format of
INNER SQL REMOTE EXEC (thread_name)in remote execution of internal SQL requests. - The value is in the format of
DAS REMOTE EXEC (thread_name)in remote execution by using DAS.
- The value is in the format of
MODULE The MODULEvalue recorded during session sampling.ACTION The ACTIONvalue recorded during session sampling. The column value is alwaysNULL.CLIENT_ID The CLIENT_IDvalue recorded during session sampling. The column value is alwaysNULL.BACKTRACE An auxiliary debugging column, which records the code call stack when an event occurs. The column value is always NULL.TM_DELTA_TIME The interval for calculating the time model, in microseconds. TM_DELTA_CPU_TIME The amount of CPU time consumed during the previous interval specified by TM_DELTA_TIME.TM_DELTA_DB_TIME The amount of time spent on database calls during the previous interval specified by TM_DELTA_TIME.TOP_LEVEL_SQL_ID The top-level SQL ID. IN_PLSQL_COMPILATION Indicates whether PL compilation is in progress. Valid values: YandN.IN_PLSQL_EXECUTION Indicates whether PL execution is in progress. Valid values: YandN.PLSQL_ENTRY_OBJECT_ID The ID of the top-level PL object. PLSQL_ENTRY_SUBPROGRAM_ID The ID of the top-level PL subprogram. PLSQL_ENTRY_SUBPROGRAM_NAME The name of the top-level PL subprogram. PLSQL_OBJECT_ID The ID of the PL object being executed. PLSQL_SUBPROGRAM_ID The ID of the PL subprogram being executed. PLSQL_SUBPROGRAM_NAME The name of the PL subprogram being executed. For more information about the
GV$ACTIVE_SESSION_HISTORYview, see GV$ACTIVE_SESSION_HISTORY.Query the
V$ACTIVE_SESSION_HISTORYview for ASH data of the current tenant.obclient [oceanbase]> SELECT * FROM oceanbase.V$ACTIVE_SESSION_HISTORY limit 1\GThe query result is as follows:
*************************** 1. row *************************** SVR_IP: xx.xx.xx.xx SVR_PORT: 2882 SAMPLE_ID: 156 SAMPLE_TIME: 2024-09-12 14:49:22 CON_ID: 1002 USER_ID: 200001 SESSION_ID: 3221489366 SESSION_TYPE: FOREGROUND SESSION_STATE: WAITING SQL_ID: 7436ED675ADD0F8C14411CC455CC7B49 PLAN_ID: 2868 TRACE_ID: YBXXXXXXXX-XXXXXXXXXXXX-0-0 EVENT: px loop condition wait EVENT_NO: 56 EVENT_ID: NULL P1TEXT: address P1: 139616155807696 P2TEXT: P2: 0 P3TEXT: P3: 0 WAIT_CLASS: CONCURRENCY WAIT_CLASS_ID: 104 TIME_WAITED: 1059 SQL_PLAN_LINE_ID: 3 GROUP_ID: NULL TX_ID: NULL BLOCKING_SESSION_ID: NULL IN_PARSE: N IN_PL_PARSE: N IN_PLAN_CACHE: N IN_SQL_OPTIMIZE: N IN_SQL_EXECUTION: N IN_PX_EXECUTION: Y IN_SEQUENCE_LOAD: N IN_COMMITTING: N IN_STORAGE_READ: N IN_STORAGE_WRITE: N IN_REMOTE_DAS_EXECUTION: N IN_FILTER_ROWS: N PROGRAM: NULL MODULE: NULL ACTION: NULL CLIENT_ID: NULL BACKTRACE: NULL TM_DELTA_TIME: NULL TM_DELTA_CPU_TIME: NULL TM_DELTA_DB_TIME: NULL TOP_LEVEL_SQL_ID: NULL IN_PLSQL_COMPILATION: N IN_PLSQL_EXECUTION: N PLSQL_ENTRY_OBJECT_ID: NULL PLSQL_ENTRY_SUBPROGRAM_ID: NULL PLSQL_ENTRY_SUBPROGRAM_NAME: NULL PLSQL_OBJECT_ID: NULL PLSQL_SUBPROGRAM_ID: NULL PLSQL_SUBPROGRAM_NAME: NULL 1 row in set (0.016 sec)The following table describes the columns.
Column Description SVR_IP The IP address of the server to which the sample belongs. SVR_PORT The port number of the server to which the sample belongs. SAMPLE_ID The unique ID of the sample. SAMPLE_TIME The sampling time. CON_ID The ID of the tenant. USER_ID The ID of the user whose session is sampled. SESSION_ID The ID of the sampled session. SESSION_TYPE The type of the session. Valid values: FOREGROUND: indicates a foreground session, namely a user session.BACKGROUND: indicates a background session, which is not supported for now.
SESSION_STATE The session status. Valid values: ON CPU: The SQL logic is being executed without waiting.WAITING: The session is waiting. The wait details are provided in theEVENTcolumn.
SQL_ID The SQL ID. PLAN_ID The plan ID of the sampled SQL statement in the plan cache, which is used to associate the sampling point with the plan. TRACE_ID The trace ID of the operator. EVENT The description of the wait event. EVENT_NO The internal number of the wait event, which is used for join query with other tables. EVENT_ID The ID of the current wait event. P1TEXT The name of the first parameter of the wait event. The parameter name varies with the event. P1 The value of the first parameter of the wait event. P2TEXT The name of the second parameter of the wait event. The parameter name varies with the event. P2 The value of the second parameter of the wait event. P3TEXT The name of the third parameter of the wait event. The parameter name varies with the event. P3 The value of the third parameter of the wait event. WAIT_CLASS The class of the wait event. WAIT_CLASS_ID The ID of the class of the wait event, which is used for join query with other tables. TIME_WAITED The total wait time of the wait event, in microseconds. SQL_PLAN_LINE_ID The ID of the SQL operator in the SQL plan when the session is being sampled. IN_PARSE Indicates whether SQL parsing is being performed in the session during sampling. IN_PL_PARSE Indicates whether SQL PL parsing is being performed in the session during sampling. IN_PLAN_CACHE Indicates whether plan caching is being performed in the session during sampling. IN_SQL_OPTIMIZE Indicates whether SQL parsing and tuning are being performed in the session during sampling. IN_SQL_EXECUTION Indicates whether an SQL statement is being executed in the session during sampling. IN_PX_EXECUTION Indicates whether parallel SQL execution is being performed in the session during sampling. If the session is in this state, it must also be in the IN_SQL_EXECUTIONstate.IN_SEQUENCE_LOAD Indicates whether values are being generated for an auto-increment column or a sequence in the session during sampling. IN_COMMITTING Indicates whether the current sampling point is in the transaction commit phase. IN_STORAGE_READ Indicates whether the current sampling point is in the storage read phase. IN_STORAGE_WRITE Indicates whether the current sampling point is in the storage write phase. IN_REMOTE_DAS_EXECUTION Indicates whether the current sampling point is in the phase of remote execution by using DAS. IN_FILTER_ROWS Indicates whether the current sampling point is in the storage pushdown phase. PROGRAM The name of the program being executed at the current sampling point. - For a background thread, the value is the name of the thread, such as
observerorWrTimer. - For a foreground thread:
- The value is in the format of
user@client_ip (thread_name)for a general request. - The value is in the format of
INNER SQL REMOTE EXEC (thread_name)in remote execution of internal SQL requests. - The value is in the format of
DAS REMOTE EXEC (thread_name)in remote execution by using DAS.
- The value is in the format of
MODULE The MODULEvalue recorded during session sampling.ACTION The ACTIONvalue recorded during session sampling. The column value is alwaysNULL.CLIENT_ID The CLIENT_IDvalue recorded during session sampling. The column value is alwaysNULL.BACKTRACE An auxiliary debugging column, which records the code call stack when an event occurs. The column value is always NULL.TM_DELTA_TIME The interval for calculating the time model, in microseconds. TM_DELTA_CPU_TIME The amount of CPU time consumed during the previous interval specified by TM_DELTA_TIME.TM_DELTA_DB_TIME The amount of time spent on database calls during the previous interval specified by TM_DELTA_TIME.TOP_LEVEL_SQL_ID The top-level SQL ID. IN_PLSQL_COMPILATION Indicates whether PL compilation is in progress. Valid values: YandN.IN_PLSQL_EXECUTION Indicates whether PL execution is in progress. Valid values: YandN.PLSQL_ENTRY_OBJECT_ID The ID of the top-level PL object. PLSQL_ENTRY_SUBPROGRAM_ID The ID of the top-level PL subprogram. PLSQL_ENTRY_SUBPROGRAM_NAME The name of the top-level PL subprogram. PLSQL_OBJECT_ID The ID of the PL object being executed. PLSQL_SUBPROGRAM_ID The ID of the PL subprogram being executed. PLSQL_SUBPROGRAM_NAME The name of the PL subprogram being executed. For more information about the
V$ACTIVE_SESSION_HISTORYview, see V$ACTIVE_SESSION_HISTORY.
Query session statistical items
Query the
oceanbase.CDB_WR_STATNAMEview for names of system statistical items of all tenants.obclient [oceanbase]> SELECT * FROM oceanbase.CDB_WR_STATNAME limit 1;The return result is as follows:
+------------+-----------+---------+---------------+ | CLUSTER_ID | TENANT_ID | STAT_ID | STAT_NAME | +------------+-----------+---------+---------------+ | 4000 | 1 | 10000 | rpc packet in | +------------+-----------+---------+---------------+ 1 row in set (0.001 sec)The following table describes the columns.
Column Description CLUSTER_ID The ID of the cluster. TENANT_ID The ID of the tenant. STAT_ID The ID of the statistical item. STAT_NAME The name of the statistical item. For more information about the
oceanbase.CDB_WR_STATNAMEview, see oceanbase.CDB_WR_STATNAME.Query the
oceanbase.DBA_WR_STATNAMEview for names of system statistical items of the current tenant.obclient [oceanbase]> SELECT * FROM oceanbase.DBA_WR_STATNAME limit 1;The return result is as follows:
+------------+-----------+---------+---------------+ | CLUSTER_ID | TENANT_ID | STAT_ID | STAT_NAME | +------------+-----------+---------+---------------+ | 4000 | 1 | 10000 | rpc packet in | +------------+-----------+---------+---------------+ 1 row in set (0.004 sec)The following table describes the columns.
Column Description CLUSTER_ID The ID of the cluster. TENANT_ID The ID of the tenant. STAT_ID The ID of the statistical item. STAT_NAME The name of the statistical item. For more information about the
DBA_WR_STATNAMEview, see oceanbase.DBA_WR_STATNAME and DBA_WR_STATNAME.Query the
oceanbase.CDB_WR_SYSSTATview for details about system statistical items of all tenants.obclient [oceanbase]> SELECT * FROM oceanbase.CDB_WR_SYSSTAT limit 1;The return result is as follows:
+------------+-----------+---------+----------------+----------+---------+--------+ | CLUSTER_ID | TENANT_ID | SNAP_ID | SVR_IP | SVR_PORT | STAT_ID | VALUE | +------------+-----------+---------+----------------+----------+---------+--------+ | 4000 | 1 | 114 | xx.xx.xx.xx | 2882 | 10000 | 228856 | +------------+-----------+---------+----------------+----------+---------+--------+ 1 row in set (0.036 sec)The following table describes the columns.
Column Description CLUSTER_ID The ID of the cluster. TENANT_ID The ID of the tenant. SNAP_ID The ID of the snapshot. SVR_IP The IP address of the OBServer node. SVR_PORT The port number of the OBServer node. STAT_ID The ID of the statistical item. VALUE The value of the statistical item. For more information about the
oceanbase.CDB_WR_SYSSTATview, see oceanbase.CDB_WR_SYSSTAT.Query the
oceanbase.DBA_WR_SYSSTATview for details about system statistical items of the current tenant.obclient [oceanbase]> SELECT * FROM oceanbase.DBA_WR_SYSSTAT limit 1;The return result is as follows:
+------------+-----------+---------+----------------+----------+---------+--------+ | CLUSTER_ID | TENANT_ID | SNAP_ID | SVR_IP | SVR_PORT | STAT_ID | VALUE | +------------+-----------+---------+----------------+----------+---------+--------+ | 4000 | 1 | 114 | xx.xx.xx.xx | 2882 | 10000 | 228856 | +------------+-----------+---------+----------------+----------+---------+--------+ 1 row in set (0.026 sec)The following table describes the columns.
Column Description CLUSTER_ID The ID of the cluster. TENANT_ID The ID of the tenant. SNAP_ID The ID of the snapshot. SVR_IP The IP address of the OBServer node. SVR_PORT The port number of the OBServer node. STAT_ID The ID of the statistical item. VALUE The value of the statistical item. For more information about the
DBA_WR_SYSSTATview, see oceanbase.DBA_WR_SYSSTAT and DBA_WR_SYSSTAT.
Query time model statistical items
Query the
GV$OB_SESS_TIME_MODELview for details about time model statistical items at the session level in the cluster.obclient [oceanbase]> SELECT * FROM oceanbase.GV$OB_SESS_TIME_MODEL LIMIT 10;The return result is as follows:
+---------------+-----------+----------------+----------+---------+--------------------+-------+ | SID | TENANT_ID | SVR_IP | SVR_PORT | STAT_ID | STAT_NAME | VALUE | +---------------+-----------+----------------+----------+---------+--------------------+-------+ | 3298534883328 | 1002 | 172.xx.xxx.xxx | 2882 | 200010 | non idle wait time | 0 | | 3298534883328 | 1002 | 172.xx.xxx.xxx | 2882 | 200011 | idle wait time | 0 | | 3848290697216 | 1001 | 172.xx.xxx.xxx | 2882 | 200010 | non idle wait time | 0 | | 3848290697216 | 1001 | 172.xx.xxx.xxx | 2882 | 200011 | idle wait time | 0 | | 3221659555 | 1 | 172.xx.xxx.xxx | 2882 | 200010 | non idle wait time | 3 | | 3221659555 | 1 | 172.xx.xxx.xxx | 2882 | 200011 | idle wait time | 0 | | 4398046511104 | 1001 | 172.xx.xxx.xxx | 2882 | 200010 | non idle wait time | 0 | | 4398046511104 | 1001 | 172.xx.xxx.xxx | 2882 | 200011 | idle wait time | 0 | | 4947802324992 | 1004 | 172.xx.xxx.xxx | 2882 | 200010 | non idle wait time | 0 | | 4947802324992 | 1004 | 172.xx.xxx.xxx | 2882 | 200011 | idle wait time | 0 | +---------------+-----------+----------------+----------+---------+--------------------+-------+ 10 rows in setThe following table describes the columns.
Column Description SID The ID of the session. TENANT_ID The ID of the tenant. SVR_IP The IP address of the OBServer node. SVR_PORT The port number of the OBServer node. STAT_ID The ID of the statistical item. STAT_NAME The name of the statistical item. VALUE The value of the statistical item. For more information about the
GV$OB_SESS_TIME_MODELview, see GV$OB_SESS_TIME_MODEL.Query the
V$OB_SESS_TIME_MODELview for details about time model statistical items at the session level on the current node.obclient [oceanbase]> SELECT * FROM oceanbase.V$OB_SESS_TIME_MODEL LIMIT 10;The query result is as follows:
+---------------+-----------+----------------+----------+---------+--------------------+-------+ | SID | TENANT_ID | SVR_IP | SVR_PORT | STAT_ID | STAT_NAME | VALUE | +---------------+-----------+----------------+----------+---------+--------------------+-------+ | 3298534883328 | 1002 | 172.xx.xxx.xxx | 2882 | 200010 | non idle wait time | 0 | | 3298534883328 | 1002 | 172.xx.xxx.xxx | 2882 | 200011 | idle wait time | 0 | | 3848290697216 | 1001 | 172.xx.xxx.xxx | 2882 | 200010 | non idle wait time | 0 | | 3848290697216 | 1001 | 172.xx.xxx.xxx | 2882 | 200011 | idle wait time | 0 | | 4398046511104 | 1001 | 172.xx.xxx.xxx | 2882 | 200010 | non idle wait time | 0 | | 4398046511104 | 1001 | 172.xx.xxx.xxx | 2882 | 200011 | idle wait time | 0 | | 3221667747 | 1 | 172.xx.xxx.xxx | 2882 | 200010 | non idle wait time | 0 | | 3221667747 | 1 | 172.xx.xxx.xxx | 2882 | 200011 | idle wait time | 0 | | 4947802324992 | 1004 | 172.xx.xxx.xxx | 2882 | 200010 | non idle wait time | 0 | | 4947802324992 | 1004 | 172.xx.xxx.xxx | 2882 | 200011 | idle wait time | 0 | +---------------+-----------+----------------+----------+---------+--------------------+-------+ 10 rows in setThe following table describes the columns.
Column Description SID The ID of the session. TENANT_ID The ID of the tenant. SVR_IP The IP address of the OBServer node. SVR_PORT The port number of the OBServer node. STAT_ID The ID of the statistical item. STAT_NAME The name of the statistical item. VALUE The value of the statistical item. For more information about the
V$OB_SESS_TIME_MODELview, see V$OB_SESS_TIME_MODEL.Query the
GV$OB_SYS_TIME_MODELview for details about time model statistical items at the tenant level in the cluster.obclient [oceanbase]> SELECT * FROM oceanbase.GV$OB_SYS_TIME_MODEL;The query result is as follows:
+-----------+----------------+----------+---------+-------------------------+------------+ | TENANT_ID | SVR_IP | SVR_PORT | STAT_ID | STAT_NAME | VALUE | +-----------+----------------+----------+---------+-------------------------+------------+ | 1002 | 172.xx.xxx.xxx | 2882 | 200001 | DB time | 6135115 | | 1002 | 172.xx.xxx.xxx | 2882 | 200002 | DB CPU | 5500079 | | 1002 | 172.xx.xxx.xxx | 2882 | 200005 | background elapsed time | 3398189713 | | 1002 | 172.xx.xxx.xxx | 2882 | 200006 | background cpu time | 3088552955 | | 1002 | 172.xx.xxx.xxx | 2882 | 200010 | non idle wait time | 635036 | | 1002 | 172.xx.xxx.xxx | 2882 | 200011 | idle wait time | 80414 | +-----------+----------------+----------+---------+-------------------------+------------+ 6 rows in setThe following table describes the columns.
Column Description TENANT_ID The ID of the tenant. SVR_IP The IP address of the OBServer node. SVR_PORT The port number of the OBServer node. STAT_ID The ID of the statistical item. STAT_NAME The name of the statistical item. VALUE The value of the statistical item. For more information about the
GV$OB_SYS_TIME_MODELview, see GV$OB_SYS_TIME_MODEL.Query the
V$OB_SYS_TIME_MODELview for details about time model statistical items at the tenant level on the current node.obclient [oceanbase]> SELECT * FROM oceanbase.V$OB_SYS_TIME_MODEL;The query result is as follows:
+-----------+----------------+----------+---------+-------------------------+------------+ | TENANT_ID | SVR_IP | SVR_PORT | STAT_ID | STAT_NAME | VALUE | +-----------+----------------+----------+---------+-------------------------+------------+ | 1002 | 172.xx.xxx.xxx | 2882 | 200001 | DB time | 6227784 | | 1002 | 172.xx.xxx.xxx | 2882 | 200002 | DB CPU | 5586418 | | 1002 | 172.xx.xxx.xxx | 2882 | 200005 | background elapsed time | 3399416601 | | 1002 | 172.xx.xxx.xxx | 2882 | 200006 | background cpu time | 3089779843 | | 1002 | 172.xx.xxx.xxx | 2882 | 200010 | non idle wait time | 641366 | | 1002 | 172.xx.xxx.xxx | 2882 | 200011 | idle wait time | 80414 | +-----------+----------------+----------+---------+-------------------------+------------+ 6 rows in setThe following table describes the columns.
Column Description TENANT_ID The ID of the tenant. SVR_IP The IP address of the OBServer node. SVR_PORT The port number of the OBServer node. STAT_ID The ID of the statistical item. STAT_NAME The name of the statistical item. VALUE The value of the statistical item. For more information about the
V$OB_SYS_TIME_MODELview, see V$OB_SYS_TIME_MODEL.Query the
oceanbase.CDB_WR_SYS_TIME_MODELview for the WR data of time model statistical items of all tenants.obclient [oceanbase]> SELECT * FROM oceanbase.CDB_WR_SYS_TIME_MODEL LIMIT 10;The query result is as follows:
+------------+-----------+---------+----------------+----------+---------+-------------------------+-----------+ | CLUSTER_ID | TENANT_ID | SNAP_ID | SVR_IP | SVR_PORT | STAT_ID | STAT_NAME | VALUE | +------------+-----------+---------+----------------+----------+---------+-------------------------+-----------+ | 10001 | 1002 | 2 | 172.xx.xxx.xxx | 2882 | 200001 | DB time | 34505 | | 10001 | 1002 | 1 | 172.xx.xxx.xxx | 2882 | 200001 | DB time | 34505 | | 10001 | 1002 | 2 | 172.xx.xxx.xxx | 2882 | 200002 | DB CPU | 1966 | | 10001 | 1002 | 1 | 172.xx.xxx.xxx | 2882 | 200002 | DB CPU | 1966 | | 10001 | 1002 | 2 | 172.xx.xxx.xxx | 2882 | 200005 | background elapsed time | 233110335 | | 10001 | 1002 | 1 | 172.xx.xxx.xxx | 2882 | 200005 | background elapsed time | 116267272 | | 10001 | 1002 | 2 | 172.xx.xxx.xxx | 2882 | 200006 | background cpu time | 209738761 | | 10001 | 1002 | 1 | 172.xx.xxx.xxx | 2882 | 200006 | background cpu time | 104674501 | | 10001 | 1002 | 1 | 172.xx.xxx.xxx | 2882 | 200010 | non idle wait time | 32539 | | 10001 | 1002 | 1 | 172.xx.xxx.xxx | 2882 | 200011 | idle wait time | 0 | +------------+-----------+---------+----------------+----------+---------+-------------------------+-----------+ 10 rows in setThe following table describes the columns.
Column Description CLUSTER_ID The ID of the cluster. TENANT_ID The ID of the tenant. SNAP_ID The ID of the snapshot. SVR_IP The IP address of the OBServer node. SVR_PORT The port number of the OBServer node. STAT_ID The ID of the statistical item. STAT_NAME The name of the statistical item. VALUE The value of the statistical item. For more information about the
oceanbase.CDB_WR_SYS_TIME_MODELview, see oceanbase.CDB_WR_SYS_TIME_MODEL.Query the
oceanbase.DBA_WR_SYS_TIME_MODELview for the WR data of time model statistical items of the current tenant.obclient [oceanbase]> SELECT * FROM oceanbase.DBA_WR_SYS_TIME_MODEL LIMIT 10;The query result is as follows:
+---------+----------------+----------+---------+-------------------------+-----------+ | SNAP_ID | SVR_IP | SVR_PORT | STAT_ID | STAT_NAME | VALUE | +---------+----------------+----------+---------+-------------------------+-----------+ | 2 | 172.xx.xxx.xxx | 2882 | 200001 | DB time | 34505 | | 1 | 172.xx.xxx.xxx | 2882 | 200001 | DB time | 34505 | | 2 | 172.xx.xxx.xxx | 2882 | 200002 | DB CPU | 1966 | | 1 | 172.xx.xxx.xxx | 2882 | 200002 | DB CPU | 1966 | | 2 | 172.xx.xxx.xxx | 2882 | 200005 | background elapsed time | 233110335 | | 1 | 172.xx.xxx.xxx | 2882 | 200005 | background elapsed time | 116267272 | | 2 | 172.xx.xxx.xxx | 2882 | 200006 | background cpu time | 209738761 | | 1 | 172.xx.xxx.xxx | 2882 | 200006 | background cpu time | 104674501 | | 1 | 172.xx.xxx.xxx | 2882 | 200010 | non idle wait time | 32539 | | 1 | 172.xx.xxx.xxx | 2882 | 200011 | idle wait time | 0 | +---------+----------------+----------+---------+-------------------------+-----------+ 10 rows in setThe following table describes the columns.
Column Description SNAP_ID The ID of the snapshot. SVR_IP The IP address of the OBServer node. SVR_PORT The port number of the OBServer node. STAT_ID The ID of the statistical item. STAT_NAME The name of the statistical item. VALUE The value of the statistical item. For more information about the
DBA_WR_SYS_TIME_MODELview, see oceanbase.DBA_WR_SYS_TIME_MODEL and DBA_WR_SYS_TIME_MODEL.
Query SQLSTAT data
Query the
GV$OB_SQLSTATview for the basic performance statistics of SQL statements in the cluster. Each SQL statement occupies one row, meaning each unique pair ofSQL_IDandPLAN_HASHoccupies a separate row. A column whose name contains_DELTAindicates the incremental value since a WR snapshot was last collected.obclient [oceanbase]> SELECT * FROM oceanbase.GV$OB_SQLSTAT LIMIT 1\GThe query result is as follows:
*************************** 1. row *************************** SVR_IP: 172.xx.xxx.xxx SVR_PORT: 2882 TENANT_ID: 1002 SQL_ID: B7A6FA97FEC98C06F9586D23935AC4C6 PLAN_ID: 0 PLAN_HASH: 0 PLAN_TYPE: 0 QUERY_SQL: START TRANSACTION SQL_TYPE: 69 MODULE: NULL ACTION: NULL PARSING_DB_ID: 201001 PARSING_DB_NAME: oceanbase PARSING_USER_ID: 200001 EXECUTIONS_TOTAL: 202176 EXECUTIONS_DELTA: 156614 DISK_READS_TOTAL: 0 DISK_READS_DELTA: 0 BUFFER_GETS_TOTAL: 0 BUFFER_GETS_DELTA: 0 ELAPSED_TIME_TOTAL: 13049640 ELAPSED_TIME_DELTA: 10085095 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: 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: 1 RETRY_DELTA: 0 PARTITION_TOTAL: 0 PARTITION_DELTA: 0 NESTED_SQL_TOTAL: 0 NESTED_SQL_DELTA: 0 SOURCE_IP: 172.xx.xxx.xxx SOURCE_PORT: 2882 1 row in setThe following table describes the columns.
Column Description SVR_IP The IP address of the OBServer node. SVR_PORT The port number of the OBServer node. TENANT_ID The ID of the tenant. SQL_ID The ID of the SQL statement. PLAN_ID The ID of the execution plan. PLAN_HASH The hash value of the execution plan. PLAN_TYPE For SQL plan caching, this column indicates the type of the plan. Valid values: 1: indicates a local plan.2: indicates a remote plan.3: indicates a distributed plan.
For PL object caching, this column indicates the type of the PL object. Valid values:1: indicates a procedure.2: indicates a function.3: indicates a package.4: indicates an anonymous block.
QUERY_SQL The full text of the SQL statement. SQL_TYPE The type of the SQL statement. MODULE The application module by which the statement was first parsed. ACTION The application action by which the statement was first parsed. PARSING_DB_ID The ID of the database where the statement was parsed. PARSING_DB_NAME The name of the database where the statement was parsed. PARSING_USER_ID The ID of the user who parsed the statement. EXECUTIONS_TOTAL The total number of executions of the plan in the plan cache. EXECUTIONS_DELTA The incremental number of executions of the plan in the plan cache. DISK_READS_TOTAL The total number of disk reads. DISK_READS_DELTA The incremental number of disk reads. BUFFER_GETS_TOTAL The total number of logical reads from the cache. BUFFER_GETS_DELTA The incremental number of logical reads from the cache. ELAPSED_TIME_TOTAL The total execution time of the statement. If the statement is executed by multiple threads in parallel, this value is the sum of the execution time taken by each thread. ELAPSED_TIME_DELTA The incremental execution time of the statement. CPU_TIME_TOTAL The total CPU time. CPU_TIME_DELTA The incremental amount of CPU time. CCWAIT_TOTAL The total wait time of concurrency wait events. CCWAIT_DELTA The incremental wait time of concurrency wait events. USERIO_WAIT_TOTAL The total wait time of user I/O wait events. USERIO_WAIT_DELTA The incremental wait time of user I/O wait events. APWAIT_TOTAL The total wait time of application wait events. APWAIT_DELTA The incremental wait time of application wait events. PHYSICAL_READ_REQUESTS_TOTAL The total number of physical reads. PHYSICAL_READ_REQUESTS_DELTA The incremental number of physical reads. PHYSICAL_READ_BYTES_TOTAL The total size in bytes of physical reads. PHYSICAL_READ_BYTES_DELTA The incremental size in bytes of physical reads. WRITE_THROTTLE_TOTAL The total amount of time of throttling for writes to the MemStore. WRITE_THROTTLE_DELTA The incremental amount of time of throttling for writes to the MemStore. ROWS_PROCESSED_TOTAL The total number of rows processed by the statement. ROWS_PROCESSED_DELTA The incremental number of rows processed by the statement. MEMSTORE_READ_ROWS_TOTAL The total number of rows read from the MemStore. MEMSTORE_READ_ROWS_DELTA The incremental number of rows read from the MemStore. MINOR_SSSTORE_READ_ROWS_TOTAL The total number of rows read from the minor SSStore. MINOR_SSSTORE_READ_ROWS_DELTA The incremental number of rows read from the minor SSStore. MAJOR_SSSTORE_READ_ROWS_TOTAL The total number of rows read from the major SSStore. MAJOR_SSSTORE_READ_ROWS_DELTA The incremental number of rows read from the major SSStore. RPC_TOTAL The total number of remote procedure call (RPC) requests. RPC_DELTA The incremental number of RPC requests. FETCHES_TOTAL The total number of result set fetches. FETCHES_DELTA The incremental number of result set fetches. RETRY_TOTAL The total number of retries of the SQL statement. RETRY_DELTA The incremental number of retries of the SQL statement. PARTITION_TOTAL The total number of partitions scanned by the SQL statement. PARTITION_DELTA The incremental number of partitions scanned by the SQL statement. NESTED_SQL_TOTAL The total number of executions of nested SQL statements. The value increases by 1 each time a nested SQL statement is executed. NESTED_SQL_DELTA The incremental number of executions of nested SQL statements. SOURCE_IP The IP address of the request source. SOURCE_PORT The port number of the request source. For more information about the
GV$OB_SQLSTATview, see GV$OB_SQLSTAT.Query the
V$OB_SQLSTATview for the basic performance statistics of SQL statements on the current node. Each SQL statement occupies one row, meaning each unique pair ofSQL_IDandPLAN_HASHoccupies a separate row. A column whose name contains_DELTAindicates the incremental value since a WR snapshot was last collected.obclient [oceanbase]> SELECT * FROM oceanbase.V$OB_SQLSTAT LIMIT 1\GThe query result is as follows:
*************************** 1. row *************************** SVR_IP: 172.xx.xxx.xxx SVR_PORT: 2882 TENANT_ID: 1002 SQL_ID: B7A6FA97FEC98C06F9586D23935AC4C6 PLAN_ID: 0 PLAN_HASH: 0 PLAN_TYPE: 0 QUERY_SQL: START TRANSACTION SQL_TYPE: 69 MODULE: NULL ACTION: NULL PARSING_DB_ID: 201001 PARSING_DB_NAME: oceanbase PARSING_USER_ID: 200001 EXECUTIONS_TOTAL: 202363 EXECUTIONS_DELTA: 156801 DISK_READS_TOTAL: 0 DISK_READS_DELTA: 0 BUFFER_GETS_TOTAL: 0 BUFFER_GETS_DELTA: 0 ELAPSED_TIME_TOTAL: 13062207 ELAPSED_TIME_DELTA: 10097662 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: 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: 1 RETRY_DELTA: 0 PARTITION_TOTAL: 0 PARTITION_DELTA: 0 NESTED_SQL_TOTAL: 0 NESTED_SQL_DELTA: 0 SOURCE_IP: 172.xx.xxx.xxx SOURCE_PORT: 2882 1 row in setThe following table describes the columns.
Column Description SVR_IP The IP address of the OBServer node. SVR_PORT The port number of the OBServer node. TENANT_ID The ID of the tenant. SQL_ID The ID of the SQL statement. PLAN_ID The ID of the execution plan. PLAN_HASH The hash value of the execution plan. PLAN_TYPE For SQL plan caching, this column indicates the type of the plan. Valid values: 1: indicates a local plan.2: indicates a remote plan.3: indicates a distributed plan.
For PL object caching, this column indicates the type of the PL object. Valid values:1: indicates a procedure.2: indicates a function.3: indicates a package.4: indicates an anonymous block.
QUERY_SQL The full text of the SQL statement. SQL_TYPE The type of the SQL statement. MODULE The application module by which the statement was first parsed. ACTION The application action by which the statement was first parsed. PARSING_DB_ID The ID of the database where the statement was parsed. PARSING_DB_NAME The name of the database where the statement was parsed. PARSING_USER_ID The ID of the user who parsed the statement. EXECUTIONS_TOTAL The total number of executions of the plan in the plan cache. EXECUTIONS_DELTA The incremental number of executions of the plan in the plan cache. DISK_READS_TOTAL The total number of disk reads. DISK_READS_DELTA The incremental number of disk reads. BUFFER_GETS_TOTAL The total number of logical reads from the cache. BUFFER_GETS_DELTA The incremental number of logical reads from the cache. ELAPSED_TIME_TOTAL The total execution time of the statement. If the statement is executed by multiple threads in parallel, this value is the sum of the execution time taken by each thread. ELAPSED_TIME_DELTA The incremental execution time of the statement. CPU_TIME_TOTAL The total CPU time. CPU_TIME_DELTA The incremental amount of CPU time. CCWAIT_TOTAL The total wait time of concurrency wait events. CCWAIT_DELTA The incremental wait time of concurrency wait events. USERIO_WAIT_TOTAL The total wait time of user I/O wait events. USERIO_WAIT_DELTA The incremental wait time of user I/O wait events. APWAIT_TOTAL The total wait time of application wait events. APWAIT_DELTA The incremental wait time of application wait events. PHYSICAL_READ_REQUESTS_TOTAL The total number of physical reads. PHYSICAL_READ_REQUESTS_DELTA The incremental number of physical reads. PHYSICAL_READ_BYTES_TOTAL The total size in bytes of physical reads. PHYSICAL_READ_BYTES_DELTA The incremental size in bytes of physical reads. WRITE_THROTTLE_TOTAL The total amount of time of throttling for writes to the MemStore. WRITE_THROTTLE_DELTA The incremental amount of time of throttling for writes to the MemStore. ROWS_PROCESSED_TOTAL The total number of rows processed by the statement. ROWS_PROCESSED_DELTA The incremental number of rows processed by the statement. MEMSTORE_READ_ROWS_TOTAL The total number of rows read from the MemStore. MEMSTORE_READ_ROWS_DELTA The incremental number of rows read from the MemStore. MINOR_SSSTORE_READ_ROWS_TOTAL The total number of rows read from the minor SSStore. MINOR_SSSTORE_READ_ROWS_DELTA The incremental number of rows read from the minor SSStore. MAJOR_SSSTORE_READ_ROWS_TOTAL The total number of rows read from the major SSStore. MAJOR_SSSTORE_READ_ROWS_DELTA The incremental number of rows read from the major SSStore. RPC_TOTAL The total number of RPC requests. RPC_DELTA The incremental number of RPC requests. FETCHES_TOTAL The total number of result set fetches. FETCHES_DELTA The incremental number of result set fetches. RETRY_TOTAL The total number of retries of the SQL statement. RETRY_DELTA The incremental number of retries of the SQL statement. PARTITION_TOTAL The total number of partitions scanned by the SQL statement. PARTITION_DELTA The incremental number of partitions scanned by the SQL statement. NESTED_SQL_TOTAL The total number of executions of nested SQL statements. The value increases by 1 each time a nested SQL statement is executed. NESTED_SQL_DELTA The incremental number of executions of nested SQL statements. SOURCE_IP The IP address of the request source. SOURCE_PORT The port number of the request source. For more information about the
V$OB_SQLSTATview, see V$OB_SQLSTAT.Query the
oceanbase.CDB_WR_SQLSTATview for the basic performance statistics of SQL statements executed in all tenants. Each SQL statement occupies one row, meaning each unique pair ofSQL_IDandPLAN_HASHoccupies a separate row. A column whose name contains_DELTAindicates the incremental value since a WR snapshot was last collected.obclient [oceanbase]> SELECT * FROM oceanbase.CDB_WR_SQLSTAT LIMIT 1;The query result is as follows:
+-----------+---------+----------------+----------+----------------------------------+---------------------+---------+-----------+--------+--------+---------------+-----------------+-----------------+------------------+------------------+------------------+------------------+-------------------+-------------------+--------------------+--------------------+----------------+----------------+--------------+--------------+-------------------+-------------------+--------------+--------------+------------------------------+------------------------------+---------------------------+---------------------------+----------------------+----------------------+----------------------+----------------------+--------------------------+--------------------------+-------------------------------+-------------------------------+-------------------------------+-------------------------------+-----------+-----------+---------------+---------------+-------------+-------------+-----------------+-----------------+------------------+------------------+----------------+-------------+ | TENANT_ID | SNAP_ID | SVR_IP | SVR_PORT | SQL_ID | PLAN_HASH | PLAN_ID | PLAN_TYPE | MODULE | ACTION | PARSING_DB_ID | PARSING_DB_NAME | PARSING_USER_ID | EXECUTIONS_TOTAL | EXECUTIONS_DELTA | DISK_READS_TOTAL | DISK_READS_DELTA | BUFFER_GETS_TOTAL | BUFFER_GETS_DELTA | ELAPSED_TIME_TOTAL | ELAPSED_TIME_DELTA | CPU_TIME_TOTAL | CPU_TIME_DELTA | CCWAIT_TOTAL | CCWAIT_DELTA | USERIO_WAIT_TOTAL | USERIO_WAIT_DELTA | APWAIT_TOTAL | APWAIT_DELTA | PHYSICAL_READ_REQUESTS_TOTAL | PHYSICAL_READ_REQUESTS_DELTA | PHYSICAL_READ_BYTES_TOTAL | PHYSICAL_READ_BYTES_DELTA | WRITE_THROTTLE_TOTAL | WRITE_THROTTLE_DELTA | ROWS_PROCESSED_TOTAL | ROWS_PROCESSED_DELTA | MEMSTORE_READ_ROWS_TOTAL | MEMSTORE_READ_ROWS_DELTA | MINOR_SSSTORE_READ_ROWS_TOTAL | MINOR_SSSTORE_READ_ROWS_DELTA | MAJOR_SSSTORE_READ_ROWS_TOTAL | MAJOR_SSSTORE_READ_ROWS_DELTA | RPC_TOTAL | RPC_DELTA | FETCHES_TOTAL | FETCHES_DELTA | RETRY_TOTAL | RETRY_DELTA | PARTITION_TOTAL | PARTITION_DELTA | NESTED_SQL_TOTAL | NESTED_SQL_DELTA | SOURCE_IP | SOURCE_PORT | +-----------+---------+----------------+----------+----------------------------------+---------------------+---------+-----------+--------+--------+---------------+-----------------+-----------------+------------------+------------------+------------------+------------------+-------------------+-------------------+--------------------+--------------------+----------------+----------------+--------------+--------------+-------------------+-------------------+--------------+--------------+------------------------------+------------------------------+---------------------------+---------------------------+----------------------+----------------------+----------------------+----------------------+--------------------------+--------------------------+-------------------------------+-------------------------------+-------------------------------+-------------------------------+-----------+-----------+---------------+---------------+-------------+-------------+-----------------+-----------------+------------------+------------------+----------------+-------------+ | 1002 | 1 | 172.xx.xxx.xxx | 2882 | 01058E374A5EF26873BA4D99C4A74582 | 5547575357486659143 | 181 | 1 | NULL | NULL | 201001 | oceanbase | 200001 | 1 | 1 | 0 | 0 | 0 | 0 | 1424 | 1424 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 172.xx.xxx.xxx | 2882 | +-----------+---------+----------------+----------+----------------------------------+---------------------+---------+-----------+--------+--------+---------------+-----------------+-----------------+------------------+------------------+------------------+------------------+-------------------+-------------------+--------------------+--------------------+----------------+----------------+--------------+--------------+-------------------+-------------------+--------------+--------------+------------------------------+------------------------------+---------------------------+---------------------------+----------------------+----------------------+----------------------+----------------------+--------------------------+--------------------------+-------------------------------+-------------------------------+-------------------------------+-------------------------------+-----------+-----------+---------------+---------------+-------------+-------------+-----------------+-----------------+------------------+------------------+----------------+-------------+ 1 row in setThe following table describes the columns.
Column Description TENANT_ID The ID of the tenant. SNAP_ID The ID of the snapshot. SVR_IP The IP address of the OBServer node. SVR_PORT The port number of the OBServer node. SQL_ID The ID of the SQL statement. PLAN_HASH The hash value of the execution plan. PLAN_ID The ID of the execution plan. PLAN_TYPE For SQL plan caching, this column indicates the type of the plan. Valid values: 1: indicates a local plan.2: indicates a remote plan.3: indicates a distributed plan.
For PL object caching, this column indicates the type of the PL object. Valid values:1: indicates a procedure.2: indicates a function.3: indicates a package.4: indicates an anonymous block.
MODULE The application module by which the statement was first parsed. ACTION The application action by which the statement was first parsed. PARSING_DB_ID The ID of the database where the statement was parsed. PARSING_DB_NAME The name of the database where the statement was parsed. PARSING_USER_ID The ID of the user who parsed the statement. EXECUTIONS_TOTAL The total number of executions of the plan in the plan cache. EXECUTIONS_DELTA The incremental number of executions of the plan in the plan cache. DISK_READS_TOTAL The total number of disk reads. DISK_READS_DELTA The incremental number of disk reads. BUFFER_GETS_TOTAL The total number of logical reads from the cache. BUFFER_GETS_DELTA The incremental number of logical reads from the cache. ELAPSED_TIME_TOTAL The total execution time of the statement. If the statement is executed by multiple threads in parallel, this value is the sum of the execution time taken by each thread. ELAPSED_TIME_DELTA The incremental execution time of the statement. CPU_TIME_TOTAL The total CPU time. CPU_TIME_DELTA The incremental amount of CPU time. CCWAIT_TOTAL The total wait time of concurrency wait events. CCWAIT_DELTA The incremental wait time of concurrency wait events. USERIO_WAIT_TOTAL The total wait time of user I/O wait events. USERIO_WAIT_DELTA The incremental wait time of user I/O wait events. APWAIT_TOTAL The total wait time of application wait events. APWAIT_DELTA The incremental wait time of application wait events. PHYSICAL_READ_REQUESTS_TOTAL The total number of physical reads. PHYSICAL_READ_REQUESTS_DELTA The incremental number of physical reads. PHYSICAL_READ_BYTES_TOTAL The total size in bytes of physical reads. PHYSICAL_READ_BYTES_DELTA The incremental size in bytes of physical reads. WRITE_THROTTLE_TOTAL The total amount of time of throttling for writes to the MemStore. WRITE_THROTTLE_DELTA The incremental amount of time of throttling for writes to the MemStore. ROWS_PROCESSED_TOTAL The total number of rows processed by the statement. ROWS_PROCESSED_DELTA The incremental number of rows processed by the statement. MEMSTORE_READ_ROWS_TOTAL The total number of rows read from the MemStore. MEMSTORE_READ_ROWS_DELTA The incremental number of rows read from the MemStore. MINOR_SSSTORE_READ_ROWS_TOTAL The total number of rows read from the minor SSStore. MINOR_SSSTORE_READ_ROWS_DELTA The incremental number of rows read from the minor SSStore. MAJOR_SSSTORE_READ_ROWS_TOTAL The total number of rows read from the major SSStore. MAJOR_SSSTORE_READ_ROWS_DELTA The incremental number of rows read from the major SSStore. RPC_TOTAL The total number of RPC requests. RPC_DELTA The incremental number of RPC requests. FETCHES_TOTAL The total number of result set fetches. FETCHES_DELTA The incremental number of result set fetches. RETRY_TOTAL The total number of retries of the SQL statement. RETRY_DELTA The incremental number of retries of the SQL statement. PARTITION_TOTAL The total number of partitions scanned by the SQL statement. PARTITION_DELTA The incremental number of partitions scanned by the SQL statement. NESTED_SQL_TOTAL The total number of executions of nested SQL statements. The value increases by 1 each time a nested SQL statement is executed. NESTED_SQL_DELTA The incremental number of executions of nested SQL statements. SOURCE_IP The IP address of the request source. SOURCE_PORT The port number of the request source. For more information about the
oceanbase.CDB_WR_SQLSTATview, see oceanbase.CDB_WR_SQLSTAT.Query the
oceanbase.DBA_WR_SQLSTATview for the basic performance statistics of SQL statements executed in the current tenant. A column whose name contains_DELTAindicates the incremental value since a WR snapshot was last collected.obclient [SYS]> SELECT * FROM SYS.DBA_WR_SQLSTAT WHERE ROWNUM = 1;The query result is as follows:
+---------+----------------+----------+----------------------------------+---------------------+---------+-----------+--------+--------+---------------+-----------------+-----------------+------------------+------------------+------------------+------------------+-------------------+-------------------+--------------------+--------------------+----------------+----------------+--------------+--------------+-------------------+-------------------+--------------+--------------+------------------------------+------------------------------+---------------------------+---------------------------+----------------------+----------------------+----------------------+----------------------+--------------------------+--------------------------+-------------------------------+-------------------------------+-------------------------------+-------------------------------+-----------+-----------+---------------+---------------+-------------+-------------+-----------------+-----------------+------------------+------------------+----------------+-------------+ | SNAP_ID | SVR_IP | SVR_PORT | SQL_ID | PLAN_HASH | PLAN_ID | PLAN_TYPE | MODULE | ACTION | PARSING_DB_ID | PARSING_DB_NAME | PARSING_USER_ID | EXECUTIONS_TOTAL | EXECUTIONS_DELTA | DISK_READS_TOTAL | DISK_READS_DELTA | BUFFER_GETS_TOTAL | BUFFER_GETS_DELTA | ELAPSED_TIME_TOTAL | ELAPSED_TIME_DELTA | CPU_TIME_TOTAL | CPU_TIME_DELTA | CCWAIT_TOTAL | CCWAIT_DELTA | USERIO_WAIT_TOTAL | USERIO_WAIT_DELTA | APWAIT_TOTAL | APWAIT_DELTA | PHYSICAL_READ_REQUESTS_TOTAL | PHYSICAL_READ_REQUESTS_DELTA | PHYSICAL_READ_BYTES_TOTAL | PHYSICAL_READ_BYTES_DELTA | WRITE_THROTTLE_TOTAL | WRITE_THROTTLE_DELTA | ROWS_PROCESSED_TOTAL | ROWS_PROCESSED_DELTA | MEMSTORE_READ_ROWS_TOTAL | MEMSTORE_READ_ROWS_DELTA | MINOR_SSSTORE_READ_ROWS_TOTAL | MINOR_SSSTORE_READ_ROWS_DELTA | MAJOR_SSSTORE_READ_ROWS_TOTAL | MAJOR_SSSTORE_READ_ROWS_DELTA | RPC_TOTAL | RPC_DELTA | FETCHES_TOTAL | FETCHES_DELTA | RETRY_TOTAL | RETRY_DELTA | PARTITION_TOTAL | PARTITION_DELTA | NESTED_SQL_TOTAL | NESTED_SQL_DELTA | SOURCE_IP | SOURCE_PORT | +---------+----------------+----------+----------------------------------+---------------------+---------+-----------+--------+--------+---------------+-----------------+-----------------+------------------+------------------+------------------+------------------+-------------------+-------------------+--------------------+--------------------+----------------+----------------+--------------+--------------+-------------------+-------------------+--------------+--------------+------------------------------+------------------------------+---------------------------+---------------------------+----------------------+----------------------+----------------------+----------------------+--------------------------+--------------------------+-------------------------------+-------------------------------+-------------------------------+-------------------------------+-----------+-----------+---------------+---------------+-------------+-------------+-----------------+-----------------+------------------+------------------+----------------+-------------+ | 1 | 172.xx.xxx.xxx | 2882 | 01058E374A5EF26873BA4D99C4A74582 | 5547575357486659143 | 223 | 1 | NULL | NULL | 201001 | oceanbase | 200001 | 1 | 1 | 1 | 1 | 1 | 1 | 1699 | 1699 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 193 | 193 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 172.xx.xxx.xxx | 2882 | +---------+----------------+----------+----------------------------------+---------------------+---------+-----------+--------+--------+---------------+-----------------+-----------------+------------------+------------------+------------------+------------------+-------------------+-------------------+--------------------+--------------------+----------------+----------------+--------------+--------------+-------------------+-------------------+--------------+--------------+------------------------------+------------------------------+---------------------------+---------------------------+----------------------+----------------------+----------------------+----------------------+--------------------------+--------------------------+-------------------------------+-------------------------------+-------------------------------+-------------------------------+-----------+-----------+---------------+---------------+-------------+-------------+-----------------+-----------------+------------------+------------------+----------------+-------------+ 1 row in setThe following table describes the columns.
Column Description SNAP_ID The ID of the snapshot. SVR_IP The IP address of the OBServer node. SVR_PORT The port number of the OBServer node. SQL_ID The ID of the SQL statement. PLAN_HASH The hash value of the execution plan. PLAN_ID The ID of the execution plan. PLAN_TYPE For SQL plan caching, this column indicates the type of the plan. Valid values: 1: indicates a local plan.2: indicates a remote plan.3: indicates a distributed plan.
For PL object caching, this column indicates the type of the PL object. Valid values:1: indicates a procedure.2: indicates a function.3: indicates a package.4: indicates an anonymous block.
MODULE The application module by which the statement was first parsed. ACTION The application action by which the statement was first parsed. PARSING_DB_ID The ID of the database where the statement was parsed. PARSING_DB_NAME The name of the database where the statement was parsed. PARSING_USER_ID The ID of the user who parsed the statement. EXECUTIONS_TOTAL The total number of executions of the plan in the plan cache. EXECUTIONS_DELTA The incremental number of executions of the plan in the plan cache. DISK_READS_TOTAL The total number of disk reads. DISK_READS_DELTA The incremental number of disk reads. BUFFER_GETS_TOTAL The total number of logical reads from the cache. BUFFER_GETS_DELTA The incremental number of logical reads from the cache. ELAPSED_TIME_TOTAL The total execution time of the statement. If the statement is executed by multiple threads in parallel, this value is the sum of the execution time taken by each thread. ELAPSED_TIME_DELTA The incremental execution time of the statement. CPU_TIME_TOTAL The total CPU time. CPU_TIME_DELTA The incremental amount of CPU time. CCWAIT_TOTAL The total wait time of concurrency wait events. CCWAIT_DELTA The incremental wait time of concurrency wait events. USERIO_WAIT_TOTAL The total wait time of user I/O wait events. USERIO_WAIT_DELTA The incremental wait time of user I/O wait events. APWAIT_TOTAL The total wait time of application wait events. APWAIT_DELTA The incremental wait time of application wait events. PHYSICAL_READ_REQUESTS_TOTAL The total number of physical reads. PHYSICAL_READ_REQUESTS_DELTA The incremental number of physical reads. PHYSICAL_READ_BYTES_TOTAL The total size in bytes of physical reads. PHYSICAL_READ_BYTES_DELTA The incremental size in bytes of physical reads. WRITE_THROTTLE_TOTAL The total amount of time of throttling for writes to the MemStore. WRITE_THROTTLE_DELTA The incremental amount of time of throttling for writes to the MemStore. ROWS_PROCESSED_TOTAL The total number of rows processed by the statement. ROWS_PROCESSED_DELTA The incremental number of rows processed by the statement. MEMSTORE_READ_ROWS_TOTAL The total number of rows read from the MemStore. MEMSTORE_READ_ROWS_DELTA The incremental number of rows read from the MemStore. MINOR_SSSTORE_READ_ROWS_TOTAL The total number of rows read from the minor SSStore. MINOR_SSSTORE_READ_ROWS_DELTA The incremental number of rows read from the minor SSStore. MAJOR_SSSTORE_READ_ROWS_TOTAL The total number of rows read from the major SSStore. MAJOR_SSSTORE_READ_ROWS_DELTA The incremental number of rows read from the major SSStore. RPC_TOTAL The total number of RPC requests. RPC_DELTA The incremental number of RPC requests. FETCHES_TOTAL The total number of result set fetches. FETCHES_DELTA The incremental number of result set fetches. RETRY_TOTAL The total number of retries of the SQL statement. RETRY_DELTA The incremental number of retries of the SQL statement. PARTITION_TOTAL The total number of partitions scanned by the SQL statement. PARTITION_DELTA The incremental number of partitions scanned by the SQL statement. NESTED_SQL_TOTAL The total number of executions of nested SQL statements. The value increases by 1 each time a nested SQL statement is executed. NESTED_SQL_DELTA The incremental number of executions of nested SQL statements. SOURCE_IP The IP address of the request source. SOURCE_PORT The port number of the request source. For more information about the
DBA_WR_SQLSTATview, see oceanbase.DBA_WR_SQLSTAT and DBA_WR_SQLSTAT.