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

本站中文解释

视图

Oracle视图 DBA_INDEX_USAGE 用于报告有关Oracle访问索引使用情况的信息,主要用于确定当前存在的索引是否被有效使用。

此视图报告有关相关索引的操作计数,包括索引分析次数、成功的查询次数、失败的查询次数、表的更新次数以及极特殊的无效查询次数。通过分析索引的使用情况,可以找出不必要的索引以及不正确的索引是否被有效使用。

要查看 DBA_INDEX_USAGE 视图,必须具有 SELECT_CATALOG_ROLE 权限,并拥有 DBA 或者 SELECT ANY DICTIONARY 权限。

查看索引使用情况,可以使用以下查询:

SELECT *
FROM DBA_INDEX_USAGE
WHERE owner = ”
AND table_name = ‘


ORDER BY index_name;

该查询将显示指定表的所有索引的使用情况。

官方英文解释

DBA_INDEX_USAGE displays cumulative statistics for each index.

Column Datatype NULL Description

OBJECT_ID

NUMBER

NOT NULL

Object ID for the index

NAME

VARCHAR2(128)

NOT NULL

Index name

OWNER

VARCHAR2(128)

NOT NULL

Index owner

TOTAL_ACCESS_COUNT

NUMBER

Total number of times the index has been accessed

TOTAL_EXEC_COUNT

NUMBER

Total executions the index has participated in

TOTAL_ROWS_RETURNED

NUMBER

Total rows returned by the index.

Index usage is categorized into buckets of different ranges. Each bucket has a range of values for access count and rows returned. An entry is placed into a bucket if the rows returned or access counts falls within the range of that bucket.

BUCKET_0_ACCESS_COUNT

NUMBER

The index has not been accessed

BUCKET_1_ACCESS_COUNT

NUMBER

The index has been accessed once

BUCKET_2_10_ACCESS_COUNT

NUMBER

The index has been accessed between 2 and 10 times

BUCKET_2_10_ROWS_RETURNED

NUMBER

The index has returned between 2 and 10 rows

BUCKET_11_100_ACCESS_COUNT

NUMBER

The index has been accessed between 11 and 100 times

BUCKET_11_100_ROWS_RETURNED

NUMBER

The index has returned between 11 and 100 rows

BUCKET_101_1000_ACCESS_COUNT

NUMBER

The index has been accessed between 101 and 1000 times

BUCKET_101_1000_ROWS_RETURNED

NUMBER

The index has returned between 101 and 1000 rows

BUCKET_1000_PLUS_ACCESS_COUNT

NUMBER

The index has been accessed more than 1000 times

BUCKET_1000_PLUS_ROWS_RETURNED

NUMBER

The index has returned more than 1000 rows

LAST_USED

DATE

Time that the index was last used

See Also:

“V$INDEX_USAGE_INFO”



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