数据仓库服务 GAUSSDB(DWS)-资源管理函数:pgxc_wlm_analyze_schema_space(cstring)

时间:2024-12-24 10:32:36

pgxc_wlm_analyze_schema_space(cstring)

描述:在CN上查询某个逻辑集群下集群整体的Schema空间信息,入参为逻辑集群名称。

返回值类型:record

函数返回字段如下:

名称

类型

描述

schemaname

text

模式名

databasename

text

数据库名

nodegroup

text

节点组名称

total_value

bigint

该模式的集群空间总值

avg_value

bigint

该模式的各实例空间平均值

skew_percent

integer

倾斜率

extend_info

text

提供信息包括:单实例空间最大值、单实例空间最小值以及最大最小空间所在的实例名

示例:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
SELECT * FROM pgxc_wlm_analyze_schema_space('group1');
     schemaname     | databasename |  nodegroup   | total_value | avg_value | skew_percent |                  extend_info
--------------------+--------------+--------------+-------------+-----------+--------------+-----------------------------------------------
 pg_catalog         | test1        | installation |    56819712 |   9469952 |            0 | min:9469952 datanode1,max:9469952 datanode1
 public             | postgres     | installation |   150495232 |  25082538 |            0 | min:24903680 datanode6,max:25280512 datanode1
 pg_toast           | test1        | installation |    11157504 |   1859584 |            0 | min:1859584 datanode1,max:1859584 datanode1
 cstore             | test1        | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 data_redis         | postgres     | installation |     1966080 |    327680 |           50 | min:0 datanode4,max:655360 datanode1
 data_redis         | test1        | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 public             | test1        | installation |       98304 |     16384 |            0 | min:16384 datanode1,max:16384 datanode1
 dbms_om            | postgres     | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 dbms_job           | postgres     | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 dbms_om            | test1        | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 dbms_job           | test1        | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 sys                | postgres     | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 sys                | test1        | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 utl_file           | postgres     | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 utl_raw            | postgres     | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 dbms_sql           | postgres     | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 dbms_output        | postgres     | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 dbms_random        | postgres     | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 dbms_lob           | postgres     | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 information_schema | postgres     | installation |     1769472 |    294912 |            0 | min:294912 datanode1,max:294912 datanode1
 information_schema | test1        | installation |     1769472 |    294912 |            0 | min:294912 datanode1,max:294912 datanode1
 utl_file           | test1        | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 dbms_output        | test1        | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 dbms_random        | test1        | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 utl_raw            | test1        | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 dbms_sql           | test1        | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 dbms_lob           | test1        | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 pg_catalog         | postgres     | installation |    75431936 |  12571989 |            3 | min:12124160 datanode4,max:13049856 datanode1
 redisuser          | postgres     | installation |     1884160 |    314026 |           50 | min:16384 datanode4,max:630784 datanode1
 pg_toast           | postgres     | installation |    17154048 |   2859008 |            7 | min:2637824 datanode4,max:3080192 datanode1
 cstore             | postgres     | installation |    15294464 |   2549077 |            5 | min:2408448 datanode1,max:2703360 datanode6
(31 rows)
support.huaweicloud.com/sqlreference-dws/dws_06_0063.html