Note
This view is available starting with V4.2.0.
Overview
Displays the real-time status of the statistical information collection task for the current tenant on the current OBServer node.
Columns
Column |
Type |
Is NULL |
Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | Tenant ID of the collection task |
| SVR_IP | varchar(46) | NO | Node address where the collection task is located |
| SVR_PORT | bigint(20) | NO | Port of the node where the collection task is located |
| SESSION_ID | bigint(20) | NO | The session ID of the collection task. For V4.2.x versions:
|
| TRACE_ID | varchar(64) | NO | TRACE ID of the collection task |
| TASK_ID | varchar(36) | NO | Collection Task ID (UUID generated, globally unique) |
| TYPE | varchar(16) | NO | Collection Task Type |
| TASK_START_TIME | datetime(6) | NO | Collection Task Start Time |
| TASK_DURATION_TIME | bigint(20) | NO | Duration of the collection task, in microseconds |
| TASK_TABLE_COUNT | bigint(20) | NO | Number of tables to collect data from |
| COMPLETED_TABLE_COUNT | bigint(20) | NO | Number of Tables for Which Collection Tasks Are Completed |
| RUNNING_TABLE_OWNER | varchar(128) | NO | Username of the user who is collecting the table |
| RUNNING_TABLE_NAME | varchar(256) | NO | The name of the table being collected by the task. |
| RUNNING_TABLE_DURATION_TIME | bigint(20) | NO | Duration for which the collection task is collecting tables |
| RUNNING_TABLE_PROGRESS | varchar(256) | NO | Collection Progress of the Collection Task |
Sample query
In a user tenant, view the real-time status of the statistical information collection task for the current node in that tenant.
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
View the collection status of tenant-level historical statistics: DBA_OB_TASK_OPT_STAT_GATHER_HISTORY
View the collection status of table-level historical statistics: DBA_OB_TABLE_OPT_STAT_GATHER_HISTORY
For more information about statistical information collection, monitoring, and diagnostics, see Statistical information collection, monitoring, and diagnostics.
