PGXC_SQL_COUNT
PGXC_SQL_COUNT displays the node-level and user-level statistical results for the SQL statements of SELECT, INSERT, UPDATE, DELETE, and MERGE INTO and DDL, DML, and DCL statements in real time, identifies query types with heavy load, and measures the capability of a cluster or a node to perform a specific type of query. For example, you can calculate QPS and collect statistics on the response time based on the quantities of the several types of SQL statements at certain time points. For example, if the SELECT count of USER1 at T1 is X1, and that at T2 is X2, the QPS of SELECT for USER1 is (X2 – X1)\(T2 – T1). In this way, the system can draw cluster-user-level QPS curve graphs and determine cluster throughput, monitoring changes in the service load of each user. If there are drastic changes, the system can locate the specific statement type (such as SELECT, INSERT, UPDATE, DELETE, and MERGE INTO). You can also observe QPS curves to determine the time points when problems occur and then locate the problems using other tools. The curves provide a basis for optimizing cluster performance and locating problems.
Columns in the PGXC_SQL_COUNT view are the same as those in the GS_SQL_COUNT view. For details, see Table 1.
If a MERGE INTO statement can be pushed down and a DN receives it, the statement will be counted on the DN and the value of the mergeinto_count column will increment by 1. If the pushdown is not allowed, the DN will receive an UPDATE or INSERT statement. In this case, the update_count or insert_count column will increment by 1.
Last Article: PGXC_STAT_BAD_BLOCK
Next Article: PGXC_THREAD_WAIT_STATUS
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.