PGXC_GET_ALL_TABLES_DIRTY_RATIO
PGXC_GET_ALL_TABLES_DIRTY_RATIO视图获取当前数据库下所有HStore_opt表的cudesc表、delta表以及CU文件的脏页率以及大小信息。该视图仅9.1.1.200及以上集群版本支持。
|
名称 |
类型 |
描述 |
|---|---|---|
|
database_name |
name |
表所在数据库的名称。 |
|
schema_name |
name |
表的模式名。 |
|
group_name |
name |
表所在逻辑集群名称。 |
|
rel_name |
name |
表名。 |
|
partition_name |
name |
表的分区名称。 |
|
cudesc_min_size |
bigint |
各个DN上最小的cudesc表大小。 |
|
cudesc_max_size |
bigint |
各个DN上最大的cudesc表大小。 |
|
cudesc_avg_size |
numeric |
各个DN上cudesc表大小的平均值。 |
|
cudesc_max_dirty_ratio |
bigint |
各个DN上cudesc表脏页率的最大值。 |
|
delta_min_size |
bigint |
各个DN上最小的delta表大小。 |
|
delta_max_size |
bigint |
各个DN上最大的delta表大小。 |
|
delta_avg_size |
numeric |
各个DN上delta表大小的平均值。 |
|
delta_max_dirty_ratio |
bigint |
各个DN上delta表脏页率的最大值。 |
|
cu_min_size |
bigint |
各个DN上最小的表cu文件大小。 |
|
cu_max_size |
bigint |
各个DN上最大的表cu文件大小。 |
|
cu_avg_size |
numeric |
各个DN上表cu文件的平均大小。 |
|
cu_max_dirty_ratio |
bigint |
各个DN上表cu文件脏页率的最大值。 |
应用示例
使用PGXC_GET_ALL_TABLES_DIRTY_RATIO视图查询当前数据库下所有Hstore_opt表的cudesc、delta表的大小与脏页情况:
1 2 3 4 5 6 7 8 9 10 |
SELECT * FROM PGXC_GET_ALL_TABLES_DIRTY_RATIO; database_name | schema_name | group_name | rel_name | partition_name | cudesc_min_size | cudesc_max_size | cudesc_avg_size | cudesc_max_dirty_ratio | delta_min_size | delta_max_size | delta_avg_size | delta_max_dirty_ratio | cu_min_size | cu_max_size | cu_avg_size | cu_max_dirty_ratio ---------------+-------------+-------------------+------------------------+----------------+-----------------+-----------------+-----------------+------------------------+----------------+----------------+----------------+- ----------------------+-------------+-------------+-------------+-------------------- postgres | dbms_om | def_regress_group | gs_wlm_session_info_v2 | p_maximum | 24576 | 24576 | 24576 | 0 | 16384 | 16384 | 16384 | 0 | 0 | 0 | 0 | 0 postgres | public | def_regress_group | test2 | | 98304 | 98304 | 98304 | 0 | 704512 | 704512 | 704512 | 0 | 491520 | 491520 | 491520 | 60 (2 rows) |