Note
This view is available starting with V4.2.0.
Purpose
This view displays the real-time status of statistics collection tasks for the current tenant on the current OBServer node.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | The ID of the tenant where the statistics collection task is located. |
| SVR_IP | varchar(46) | NO | The IP address of the node where the statistics collection task is located. |
| SVR_PORT | bigint(20) | NO | The port of the node where the statistics collection task is located. |
| SESSION_ID | bigint(20) | NO | The session ID where the statistics collection task is located. For V4.2.x:
|
| TRACE_ID | varchar(64) | NO | The TRACE ID where the statistics collection task is located. |
| TASK_ID | varchar(36) | NO | The ID of the statistics collection task (UUID, globally unique). |
| TYPE | varchar(16) | NO | The type of the statistics collection task. |
| TASK_START_TIME | datetime(6) | NO | The start time of the statistics collection task. |
| TASK_DURATION_TIME | bigint(20) | NO | The duration of the statistics collection task, in microseconds. |
| TASK_TABLE_COUNT | bigint(20) | NO | The number of tables to be collected by the statistics collection task. |
| COMPLETED_TABLE_COUNT | bigint(20) | NO | The number of tables that have been collected by the statistics collection task. |
| RUNNING_TABLE_OWNER | varchar(128) | NO | The username of the user who is collecting the table. |
| RUNNING_TABLE_NAME | varchar(256) | NO | The name of the table being collected. |
| RUNNING_TABLE_DURATION_TIME | bigint(20) | NO | The duration of the table being collected. |
Sample query
Query the real-time status of statistics collection tasks for the current tenant on the current node.
obclient> SELECT * FROM oceanbase.V$OB_OPT_STAT_GATHER_MONITOR;
The query result is as follows:
+-----------+----------------+----------+------------+-----------------------------------+--------------------------------------+---------------+----------------------------+--------------------+------------------+-----------------------+---------------------+--------------------+-----------------------------+
| TENANT_ID | SVR_IP | SVR_PORT | SESSION_ID | TRACE_ID | TASK_ID | TYPE | TASK_START_TIME | TASK_DURATION_TIME | TASK_TABLE_COUNT | COMPLETED_TABLE_COUNT | RUNNING_TABLE_OWNER | RUNNING_TABLE_NAME | RUNNING_TABLE_DURATION_TIME |
+-----------+----------------+----------+------------+-----------------------------------+--------------------------------------+---------------+----------------------------+--------------------+------------------+-----------------------+---------------------+--------------------+-----------------------------+
| 1002 | xxx.xxx.xxx.xx | 2882 | 3221575784 | YB42AC1E87C6-0005FF6AD9F825FB-0-0 | c921f339-1bc8-11ee-a7ea-52583362494c | MANUAL GATHER | 2023-07-06 14:46:07.691856 | 609652 | 1 | 0 | test | t1 | 609653 |
+-----------+----------------+----------+------------+-----------------------------------+--------------------------------------+---------------+----------------------------+--------------------+------------------+-----------------------+---------------------+--------------------+-----------------------------+
1 row in set
References
- For more information about statistics collection monitoring and diagnostics, see Statistics collection monitoring and diagnostics.