Oracle 视图 ALL_TAB_PENDING_STATS 官方解释,作用,如何使用详细说明

本站中文解释

ALL_TAB_PENDING_STATS视图,位于SYS视图空间,提供数据字典中的统计信息,用于显示所有具有统计信息等待实施的表或索引。

此视图包含以下列:

OWNER:存储表或索引的拥有者。
TABLE_NAME:表或索引的名称。
PENDING_STATS:指示是否存在等待实施的统计信息。

使用方法:

1.查询所有有待实施统计信息的表和索引:
SELECT owner, table_name FROM all_tab_pending_stats WHERE pending_stats = ‘YES’;

2.从ALL_TAB_PENDING_STATS视图中删除无效的PENDING_STATS:
DELETE FROM all_tab_pending_stats WHERE pending_stats = ‘NO’;

3.检查是否存在还未实施的统计信息:
SELECT COUNT(*) FROM all_tab_pending_stats;

官方英文解释

ALL_TAB_PENDING_STATS describes pending statistics for tables, partitions, and subpartitions accessible to the current user.

Related Views

  • DBA_TAB_PENDING_STATS describes pending statistics for tables, partitions, and subpartitions in the database.

  • USER_TAB_PENDING_STATS describes pending statistics for tables, partitions, and subpartitions owned by the current user. This view does not display the OWNER column.

Column Datatype NULL Description

OWNER

VARCHAR2(128)

Owner of the table

TABLE_NAME

VARCHAR2(128)

Name of the table

PARTITION_NAME

VARCHAR2(128)

Name of the partition

SUBPARTITION_NAME

VARCHAR2(128)

Name of the subpartition

NUM_ROWS

NUMBER

Number of rows

BLOCKS

NUMBER

Number of blocks

AVG_ROW_LEN

NUMBER

Average row length

IM_IMCU_COUNT

NUMBER

Number of In-Memory Compression Units (IMCUs) in the table.

IM_BLOCK_COUNT

NUMBER

Number of In-Memory blocks in the table.

SCAN_RATE

NUMBER

Scan rate for the table in megabytes per second. This statistic is only relevant or meaningful for external tables.

SAMPLE_SIZE

NUMBER

Sample size

LAST_ANALYZED

DATE

Time of last analyze operation

See Also:

  • “DBA_TAB_PENDING_STATS”

  • “USER_TAB_PENDING_STATS”


数据运维技术 » Oracle 视图 ALL_TAB_PENDING_STATS 官方解释,作用,如何使用详细说明