Oracle 视图 INDEX_STATS 官方解释,作用,如何使用详细说明
本站中文解释
Oracle视图INDEX_STATS用于检索索引空间统计,它可以显示各索引的索引表页数量和其他有关信息,如文件上的插入和删除操作。另外,这个视图可以用来验证索引的效率。
INDEX_STATS可以使用以下查询语句检索索引统计信息:
“`
SELECT owner,table_name,index_name,num_rows,blevel,leaf_blocks
FROM index_stats;
“`
官方英文解释
INDEX_STATS
stores information from the last ANALYZE INDEX ... VALIDATE STRUCTURE
statement.
Note:
The ANALYZE INDEX ... VALIDATE STRUCTURE OFFLINE
statement must be used in order to collect statistics
Column | Datatype | NULL | Description |
---|---|---|---|
|
|
Height of the B-Tree |
|
|
|
|
Blocks allocated to the segment |
|
|
|
Name of the index |
|
|
Name of the partition of the index which was analyzed. If the index is not partitioned, NULL is returned. |
|
|
|
Number of leaf rows (values in the index) |
|
|
|
Number of leaf blocks in the B-Tree |
|
|
|
Sum of the lengths of all the leaf rows |
|
|
|
Usable space in a leaf block |
|
|
|
Number of branch rows in the B-Tree |
|
|
|
Number of branch blocks in the B-Tree |
|
|
|
Sum of the lengths of all the branch blocks in the B-Tree |
|
|
|
Usable space in a branch block |
|
|
|
Number of deleted leaf rows in the index |
|
|
|
Total length of all deleted rows in the index |
|
|
|
Number of distinct keys in the index (may include rows that have been deleted) |
|
|
|
How many times the most repeated key is repeated (may include rows that have been deleted) |
|
|
|
Total space currently allocated in the B-Tree |
|
|
|
Total space that is currently being used in the B-Tree |
|
|
|
Percent of space allocated in the B-Tree that is being used |
|
|
|
Average number of rows per distinct key (this figure is calculated without consideration of deleted rows) |
|
|
|
Expected number of consistent mode block reads per row, assuming that a randomly chosen row is accessed using the index. Used to calculate the number of consistent reads that will occur during an index scan. |
|
|
|
Number of prefix rows (values in the index) |
|
|
|
Sum of lengths of all prefix rows |
|
|
|
Optimal index compression length |
|
|
|
Corresponding space savings after an |
|
|
|
Number of deleted rows that are within a compression unit (CU) |
|
|
|
Number of purged rows that are within a CU |
|
|
|
Number of rows that are in a CU or prefix compressed |
|
|
|
Sum of lengths of all prefix rows and CUs |
|
|
|
Number of rows that are neither in a CU nor prefix compressed |
|
|
|
Sum of lengths of rows that are neither in a CU nor prefix compressed |
|
|
|
Sum of lengths of suffix rows |
|
|
|
Sum of the uncompressed lengths of rows that are in a CU or prefix compressed |
|
|
|
Sum of CU recompression counts |
|
|
|
Sum of CU lock vector lengths |
|
|
|
Number of blocks that have a CU or nonzero prefix column count |
|
|
|
Number of blocks that do not have a CU and have a zero prefix column count |