• Data Warehouse Service

dws
  1. Help Center
  2. Data Warehouse Service
  3. Developer Guide
  4. Systems Tables and Views
  5. GS_SQL_COUNT

GS_SQL_COUNT

GS_SQL_COUNT displays statistics about four types of running statements (SELECT, INSERT, UPDATE, DELETE, and MERGE INTO) on the current node of the database. When a common user queries the GS_SQL_COUNT view, statistics about the current node of only the user are displayed. When an administrator queries the GS_SQL_COUNT view, statistics about the current node of all users are displayed. When the cluster or node is restarted, the statistics are cleared and will be measured again. The system counts when a node receives a query, including a query inside the cluster. For example, when a CN receives a query and distributes multiple queries to DNs, the queries are counted accordingly on the DNs.

Table 1 GS_SQL_COUNT columns

Name

Type

Description

node_name

text

Node name

user_name

text

User name

select_count

bigint

Statistical result of the SELECT statement

update_count

bigint

Statistical result of the UPDATE statement

insert_count

bigint

Statistical result of the INSERT statement

delete_count

bigint

Statistical result of the DELETE statement

mergeinto_count

bigint

Statistical result of the MERGE INTO statement