Note
This view is available starting with V4.2.0.
Overview
Displays the execution status of historical collection tasks for the current tenant.
Columns
Column |
Type |
Is NULL |
Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | Tenant ID of the collection task |
| TASK_ID | varchar(36) | NO | Collection task ID (UUID generated, globally unique) |
| TYPE | varchar(16) | NO | Collection task type:
|
| STATUS | varchar(8) | NO | Collection Task Status
|
| TABLE_COUNT | bigint(20) | YES | Number of tables to collect data from |
| FAILED_COUNT | bigint(20) | YES | Number of Tables Failed to Collect in the Collection Task |
| START_TIME | datetime(6) | NO | Start Time of Collection Task |
| END_TIME | datetime(6) | NO | End time of the collection task |
Sample query
View the historical execution status of manual collection tasks for this tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_TASK_OPT_STAT_GATHER_HISTORY WHERE TYPE='MANUAL GATHER';
The query result is as follows:
+-----------+--------------------------------------+---------------+---------+-------------+--------------+----------------------------+----------------------------+
| TENANT_ID | TASK_ID | TYPE | STATUS | TABLE_COUNT | FAILED_COUNT | START_TIME | END_TIME |
+-----------+--------------------------------------+---------------+---------+-------------+--------------+----------------------------+----------------------------+
| 1 | 5b965b29-062d-11f0-9059-00163e0d8e01 | MANUAL GATHER | FAILED | 1 | 1 | 2025-03-21 16:20:32.834753 | 2025-03-21 16:20:32.836438 |
| 1 | 719de009-062d-11f0-9059-00163e0d8e01 | MANUAL GATHER | SUCCESS | 1 | 0 | 2025-03-21 16:21:09.793531 | 2025-03-21 16:21:09.891911 |
+-----------+--------------------------------------+---------------+---------+-------------+--------------+----------------------------+----------------------------+
2 rows in set
References
View the collection status of table-level historical statistics: DBA_OB_TABLE_OPT_STAT_GATHER_HISTORY
For more information about statistics collection, monitoring, and diagnostics, see Statistics collection, monitoring, and diagnostics.
