本站中文解释
视图
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 = ‘
Column | Datatype | NULL | Description |
---|---|---|---|
|
|
|
Object ID for the index |
|
|
|
Index name |
|
|
|
Index owner |
|
|
Total number of times the index has been accessed |
|
|
|
Total executions the index has participated in |
|
|
|
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. |
|
|
|
The index has not been accessed |
|
|
|
The index has been accessed once |
|
|
|
The index has been accessed between 2 and 10 times |
|
|
|
The index has returned between 2 and 10 rows |
|
|
|
The index has been accessed between 11 and 100 times |
|
|
|
The index has returned between 11 and 100 rows |
|
|
|
The index has been accessed between 101 and 1000 times |
|
|
|
The index has returned between 101 and 1000 rows |
|
|
|
The index has been accessed more than 1000 times |
|
|
|
The index has returned more than 1000 rows |
|
|
|
Time that the index was last used |
See Also:
“V$INDEX_USAGE_INFO”