GaussDB-GS_SQL_COUNT

40 阅读1分钟

GaussDB-GS_SQL_COUNT

GS_SQL_COUNT displays statistics about five 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 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.
NameTypeDescription
node_namenameNode name.
user_namenameUsername.
select_countbigintStatistical result of the SELECT statement.
update_countbigintStatistical result of the UPDATE statement.
insert_countbigintStatistical result of the INSERT statement.
delete_countbigintStatistical result of the DELETE statement.
mergeinto_countbigintStatistical result of the MERGE INTO statement
ddl_countbigintNumber of DDL statements.
dml_countbigintNumber of DML statements.
dcl_countbigintNumber of DCL statements.
total_select_elapsebigintTotal response time of SELECT statements (unit: μs).
avg_select_elapsebigintAverage response time of SELECT statements (unit: μs).
max_select_elapsebigintMaximum response time of SELECT statements (unit: μs).
min_select_elapsebigintMinimum response time of SELECT statements (unit: μs).
total_update_elapsebigintTotal response time of UPDATE statements (unit: μs).
avg_update_elapsebigintAverage response time of UPDATE statements (unit: μs).
max_update_elapsebigintMaximum response time of UPDATE statements (unit: μs).
min_update_elapsebigintMinimum response time of UPDATE statements (unit: μs).
total_insert_elapsebigintTotal response time of INSERT statements (unit: μs).
avg_insert_elapsebigintAverage response time of INSERT statements (unit: μs).
max_insert_elapsebigintMaximum response time of INSERT statements (unit: μs).
min_insert_elapsebigintMinimum response time of INSERT statements (unit: μs).
total_delete_elapsebigintTotal response time of DELETE statements (unit: μs).
avg_delete_elapsebigintAverage response time of DELETE statements (unit: μs).
max_delete_elapsebigintMaximum response time of DELETE statements (unit: μs).
min_delete_elapsebigintMinimum response time of DELETE statements (unit: μs).

更多详情请参考GaussDB 文档中心:doc.hcs.huawei.com/db/zh-cn/ga…