Note
This view is available starting with V4.2.0.
Purpose
This view displays the execution status of historical statistics collection for tables in the current tenant.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| OWNER | VARCHAR2(128) | YES | The username of the table. |
| TABLE_NAME | VARCHAR2(256) | NO | The name of the table. |
| TASK_ID | VARCHAR2(36) | NO | The task ID to which the table statistics collection belongs. |
| STATUS | VARCHAR2(8) | NO | The status of the statistics collection task. Valid values:
|
| START_TIME | TIMESTAMP(6) | YES | The start time of the table statistics collection. |
| END_TIME | TIMESTAMP(6) | YES | The end time of the table statistics collection. |
| MEMORY_USED | NUMBER | YES | The memory used for the table statistics collection. |
| STAT_REFRESH_FAILED_LIST | VARCHAR2(4096) | YES | The list of failed statistics refreshes for the table. |
| PROPERTIES | VARCHAR2(4096) | YES | The property settings for the table statistics collection. |
Sample query
Query the execution status of historical statistics collection for the T2_M_LR table in the current tenant.
obclient [SYS]> SELECT * FROM SYS.DBA_OB_TABLE_OPT_STAT_GATHER_HISTORY WHERE TABLE_NAME='T2_M_LR'\G
The query result is as follows:
*************************** 1. row ***************************
OWNER: SYS
TABLE_NAME: T2_M_LR
TASK_ID: 1c354c5c-0080-11f0-8530-4e5e0075b0a3
STATUS: SUCCESS
START_TIME: 14-MAR-25 10.58.03.617310 AM
END_TIME: 14-MAR-25 10.58.03.659506 AM
MEMORY_USED: 30752
STAT_REFRESH_FAILED_LIST: NULL
PROPERTIES: GRANULARITY:AUTO;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
*************************** 2. row ***************************
OWNER: SYS
TABLE_NAME: T2_M_LR
TASK_ID: 2ba66299-ff1d-11ef-8530-4e5e0075b0a3
STATUS: SUCCESS
START_TIME: 12-MAR-25 04.37.02.321848 PM
END_TIME: 12-MAR-25 04.37.02.413349 PM
MEMORY_USED: 8778
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
*************************** 3. row ***************************
OWNER: SYS
TABLE_NAME: T2_M_LR
TASK_ID: 72cc0cb6-ff1d-11ef-8530-4e5e0075b0a3
STATUS: SUCCESS
START_TIME: 12-MAR-25 04.39.01.686689 PM
END_TIME: 12-MAR-25 04.39.01.781900 PM
MEMORY_USED: 3162
STAT_REFRESH_FAILED_LIST: NULL
PROPERTIES: GRANULARITY:PARTITION;METHOD_OPT:FOR ALL COLUMNS SIZE SKEWONLY;DEGREE:64;ESTIMATE_PERCENT:100.000000;BLOCK_SAMPLE:0;STALE_PERCENT:-1.000000;HIST_EST_PERCENT:100.000000
3 rows in set
References
View the status of historical statistics collection at the tenant level: DBA_OB_TASK_OPT_STAT_GATHER_HISTORY
For information about how to collect statistics, see the following topics:
For detailed information about statistics collection monitoring and diagnostics, see Statistics collection monitoring and diagnostics.