Oracle 视图 ALL_IND_STATISTICS 官方解释,作用,如何使用详细说明
本站中文解释
ALL_IND_STATISTICS视图提供了在聚簇索引中各个列的统计信息。用户可以通过ALL_IND_STATISTICS视图查询表中列的统计信息,如表的块数、行数、全局高速缓存缩放量等,以便进行优势计划。查询ALL_IND_STATISTICS视图的步骤如下:
(1) 首先可以运行以下查询语句来检索有关表的所有聚簇索引的统计信息
SELECT * FROM ALL_IND_STATISTICS WHERE TABLE_NAME=’表名’;
(2) 如果要查询特定的列的统计信息,可以增加一句过滤数据,如:
SELECT * FROM ALL_IND_STATISTICS WHERE TABLE_NAME=’表名’ AND COLUMN_NAME=’列名’;
(3) 如果要检索有关表中特定索引的统计信息,可以运行以下SQL语句:
SELECT * FROM ALL_IND_STATISTICS WHERE TABLE_NAME=’表名’ AND INDEX_NAME=’索引名’;
使用ALL_IND_STATSITICS视图可以知道聚簇索引中各个列的统计信息,当需要优化和调整表的索引时,就可以根据统计信息来决定优化的选择,以便更有效地改善查询的性能。
官方英文解释
ALL_IND_STATISTICS
displays optimizer statistics for the indexes on the tables accessible to the current user collected using the DBMS_STATS
package.
Related Views
-
DBA_IND_STATISTICS
displays optimizer statistics for all indexes in the database. -
USER_IND_STATISTICS
displays optimizer statistics for the indexes on the tables owned by the current user. This view does not display theOWNER
column.
Column | Datatype | NULL | Description |
---|---|---|---|
|
|
Owner of the index |
|
|
|
Name of the index |
|
|
|
Owner of the indexed object |
|
|
|
Name of the indexed object |
|
|
|
Name of the partition |
|
|
|
Position of the partition within the index |
|
|
|
Name of the subpartition |
|
|
|
Position of the subpartition within the partition |
|
|
|
Type of the object:
|
|
|
|
B-Tree level |
|
|
|
Number of leaf blocks in the index |
|
|
|
Number of distinct keys in the index |
|
|
|
Average number of leaf blocks per key |
|
|
|
Average number of data blocks per key |
|
|
|
Indicates the amount of order of the rows in the table based on the values of the index.
|
|
|
|
Number of rows in the index |
|
|
|
Average number of blocks in the buffer cache |
|
|
|
Average cache hit ratio for the object |
|
|
|
Sample size used in analyzing the index |
|
|
|
Date of the most recent time the index was analyzed |
|
|
|
|
|
|
|
Indicates whether statistics were entered directly by the user ( |
|
|
|
Type of statistics lock |
|
|
|
Whether statistics for the object are stale or not |
|
|
|
The value is For a global tempoary table, the possible values are:
See Oracle Database PL/SQL |
See Also:
-
“DBA_IND_STATISTICS”
-
“USER_IND_STATISTICS”
-
Oracle Database PL/SQL
Packages and Types Reference for more information about theDBMS_STATS
package