数据仓库服务 GAUSSDB(DWS)-其它函数:pgxc_get_workload_sql_count()

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

pgxc_get_workload_sql_count()

描述:提供当前集群所有CN上所有Workload控制组内执行的SELECT/UPDATE/INSERT/DELETE语句的计数统计结果以及DDL、DML、DCL类型语句的计数统计结果。

返回值类型:record

示例:

1
2
3
4
5
6
7
SELECT * FROM pgxc_get_workload_sql_count();
 node_name |   workload   | select_count | update_count | insert_count | delete_count | ddl_count | dml_count | dcl_count
-----------+--------------+--------------+--------------+--------------+--------------+-----------+-----------+-----------
 cn_5003   | default_pool |      2079352 |         3264 |        22858 |            3 |     10460 |   2243738 |     16988
 cn_5001   | default_pool |      2201345 |            9 |            0 |            0 |     10474 |   2359633 |     10465
 cn_5002   | default_pool |      3784696 |            0 |       103106 |          136 |     10438 |   4039090 |     10498
(3 rows)
support.huaweicloud.com/sqlreference-dws/dws_06_0062.html