Note
This view is available starting with V4.2.0.
Overview
Displays the execution status of historical statistics collection for tables in the current tenant.
Columns
Column |
Type |
Is NULL |
Description |
|---|---|---|---|
| OWNER | varchar(128) | NO | Table username |
| TABLE_NAME | varchar(256) | NO | Table name |
| TASK_ID | varchar(36) | NO | Task ID of the table collection |
| STATUS | varchar(8) | NO | Collection Task Status
|
| START_TIME | datetime(6) | YES | Time when table collection started |
| END_TIME | datetime(6) | YES | Time of Table Collection |
| MEMORY_USED | bigint(20) | YES | Memory Used by Table Collection |
| STAT_REFRESH_FAILED_LIST | text | YES | List of Tables That Failed to Collect and Refresh Statistical Information Cache |
| PROPERTIES | text | YES | Table Collection Attribute Settings |
Sample query
Check the execution status of historical statistics collection for table tbl1 in this tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_TABLE_OPT_STAT_GATHER_HISTORY WHERE TABLE_NAME='tbl1'\G
The query result is as follows:
*************************** 1. row ***************************
OWNER: test
TABLE_NAME: tbl1
TASK_ID: 1313c707-ff26-11ef-8530-4e5e0075b0a3
STATUS: SUCCESS
START_TIME: 2025-03-12 17:40:46.566433
END_TIME: 2025-03-12 17:40:46.630407
MEMORY_USED: 5370
STAT_REFRESH_FAILED_LIST: NULL
PROPERTIES: GRANULARITY:GLOBAL;METHOD_OPT:FOR ALL COLUMNS SIZE AUTO;DEGREE:1;ESTIMATE_PERCENT:100.000000;BLOCK_SAMPLE:0;STALE_PERCENT:-1.000000;HIST_EST_PERCENT:100.000000
1 row in set
References
View the collection status of tenant-level historical statistics: DBA_OB_TASK_OPT_STAT_GATHER_HISTORY
For information about how to collect statistics, see the following topics:
For more information about statistics collection, monitoring, and diagnostics, see Statistics collection, monitoring, and diagnostics.
