Oracle 视图 DBA_HIGH_WATER_MARK_STATISTICS 官方解释,作用,如何使用详细说明
本站中文解释
Oracle视图DBA_HIGH_WATER_MARK_STATISTICS提供了High water mark(高水位线)的状况信息,它是一种分析提供占用空间和行访问频率的机制,一般使用于确定表和索引的内存空间构成。
使用方法:
1. 首先查询表的DBA_HIGH_WATER_MARK_STATISTICS:
SELECT * FROM DBA_HIGH_WATER_MARK_STATISTICS WHERE TABLE_NAME = ‘example_table’;
2. 通过DBA_HIGH_WATER_MARK_STATISTICS对需要分析的表指定索引:
SELECT * FROM DBA_HIGH_WATER_MARK_STATISTICS WHERE TABLE_NAME = ‘example_table’ AND INDEX_NAME = ‘example_index’;
3. 然后根据查询的统计数据确定表和索引的内存空间使用:
TABLE_NAME:指定的表
BLOCKS_ALLOCATED:分配给表的块数
BLOCKS_HIGH_WTR_MARK:分配的最高水位的块数
ROWS_HIGH_WTR_MARK:在最高水位下的行数
比如:如果BLOCKS_HIGH_WTR_MARK大于BLOCKS_ALLOCATED,则表示表空间被用足,需要扩容内存空间。
官方英文解释
DBA_HIGH_WATER_MARK_STATISTICS
displays information about database high-watermark statistics.
Column | Datatype | NULL | Description |
---|---|---|---|
|
|
|
Identifier of the database for which the high-watermark statistics are tracked |
|
|
|
Name of the high-watermark statistic (see Table 5-1) |
|
|
|
Database version in which the high watermarks were tracked |
|
|
Highest value of the statistic seen at sampling time |
|
|
|
Value of the statistic at the last sample time |
|
|
|
Description of the high-watermark statistics (see Table 5-1) |
Table 5-1 DBA_HIGH_WATER_MARK_STATISTICS Statistics
Name | Description |
---|---|
ACTIVE_SESSIONS |
Maximum Number of Active Sessions seen in the system |
CPU_COUNT |
Maximum Number of CPUs |
DATAFILES |
Maximum Number of Datafiles |
DB_SIZE |
Maximum Size of the Database (Bytes) |
EXADATA_DISKS |
Number of physical disks |
INSTANCES |
Oracle Database instances |
PART_INDEXES |
Maximum Number of Partitions belonging to an User Index |
PART_TABLES |
Maximum Number of Partitions belonging to an User Table |
QUERY_LENGTH |
Maximum Query Length |
SEGMENT_SIZE |
Size of Largest Segment (Bytes) |
SESSIONS |
Maximum Number of Concurrent Sessions seen in the database |
SQL_NCHAR_COLUMNS |
Maximum Number of SQL NCHAR Columns |
TABLESPACES |
Maximum Number of Tablespaces |
USER_INDEXES |
Number of User Indexes |
USER_MV |
Maximum Number of Materialized Views (User) |
USER_TABLES |
Number of User Tables |