当前位置:网站首页>GaussDB 如何统计用户sql的响应时间
GaussDB 如何统计用户sql的响应时间
2022-06-25 10:47:00 【华为云】
通过PGXC_SQL_COUNT视图,可以实时显示SELECT、INSERT、UPDATE、DELETE、
MERGE INTO五种SQL、以及DDL、DML、DCL语句的节点级和用户级统计结果,识
别当前业务负载较重的query类型,衡量整个集群和单个节点执行某种类型查询的能
力。通过对以上几类SQL查询进行计数和响应时间统计,获得指定时刻的统计结果,
经计算可以得到指定QPS等统计信息。例如,T1时刻,USER1的SELECT计数结果为
X1,T2时刻为X2,则可计算得到该用户SELECT查询的QPS值为(X2-X1)/(T2-T1)。由
此,可获得集群用户级QPS曲线图和集群吞吐情况,监测每个用户的业务负载是否发
生剧烈变化。如果有剧烈变化,可以定位具体的语句类型(SELECT/INSERT/UPDATE/
DELETE/MERGE INTO)。同时观测QPS曲线可以获知问题发生时间点,结合其它工
具,定位问题点。能够为集群性能调优、问题定位等提供依据。
PGXC_SQL_COUNT定义
名称 | 类型 | 描述 |
---|---|---|
node_name | name | 节点名称 |
user_name | name | 用户名 |
select_count | bigint | SELECT数量 |
update_count | bigint | UPDATE数量 |
insert_count | bigint | INSERT数量 |
delete_count | bigint | DELETE数量 |
mergeinto_count | bigint | MERGE INTO数量 |
ddl_count | bigint | DDL数量 |
dml_count | bigint | DML数量 |
dcl_count | bigint | DCL数量 |
total_select_elapse | bigint | SELECT总响应时间 |
avg_select_elapse | bigint | SELECT平均响应时间 |
max_select_elapse | bigint | SELECT最大响应时间 |
min_select_elapse | bigint | SELECT最小响应时间 |
total_update_elapse | bigint | UPDATE总响应时间 |
avg_update_elapse | bigint | UPDATE平均响应时间 |
max_update_elapse | bigint | UPDATE最大响应时间 |
min_update_elapse | bigint | UPDATE最小响应时间 |
total_delete_elapse | bigint | DELETE总响应时间 |
avg_delete_elapse | bigint | DELETE平均响应时间 |
max_delete_elapse | bigint | DELETE最大响应时间 |
min_delete_elapse | bigint | DELETE最小响应时间 |
total_insert_elapse | bigint | INSERT总响应时间 |
avg_insert_elapse | bigint | INSERT平均响应时间 |
max_insert_elapse | bigint | INSERT最大响应时间 |
min_insert_elapse | bigint | INSERT最小响应时间 |
边栏推荐
- Array structure collation
- [file inclusion vulnerability-04] classic interview question: how to getshell when a website is known to have only local file inclusion vulnerability?
- 金仓数据库 KingbaseES 插件DBMS_RANDOM
- 【系统分析师之路】第六章 复盘需求工程(综合知识概念)
- 性能之内存篇
- 性能之文件系统篇
- Simple use of SVN
- scrapy+scrapyd+gerapy 爬虫调度框架
- Shardingsphere proxy 5.0 sub database and sub table (I)
- 网易开源的分布式存储系统 Curve 正式成为 CNCF 沙箱项目
猜你喜欢
Task03 probability theory
[file containing vulnerability-03] six ways to exploit file containing vulnerabilities
XSS攻击
网络远程访问的方式使用树莓派
On binary tree
[file inclusion vulnerability-04] classic interview question: how to getshell when a website is known to have only local file inclusion vulnerability?
A five-year technical Er, based on the real experience of these years, gives some suggestions to the fresh students
Houdini graphic notes: could not create OpenCL device of type (houdini_ocl_devicetype) problem solving
Netease's open source distributed storage system curve officially became the CNCF sandbox project
Network protocol learning -- lldp protocol learning
随机推荐
Google Earth engine (GEE) - evaluate enables one click batch download of all single images in the research area (some areas in Shanghai)
手机办理长投学堂证券开户靠谱安全吗?
[200 opencv routines] 210 Are there so many holes in drawing a straight line?
Macro application connector\
金仓数据库 KingbaseES 插件ftutilx
Unreal Engine graphics and text notes: use VAT (vertex animation texture) to make Houdini end on Houdini special effect (ue4/ue5)
【文件包含漏洞-03】文件包含漏洞的六种利用方式
The real difference between i++ and ++i
TASK03|概率论
zabbix分布式系统监控
At 16:00 today, Mr. sunxiaoming, a researcher of the Institute of computing, Chinese Academy of Sciences, took you into the quantum world
Checking whether the double value is an integer - Swift - checking if a double value is an integer - swift
Android:kotlin中Gson与JSON的泛型映射解析
Is it safe to open an account through mobile phone if you open an account through stock speculation? Who knows?
Use of three-level linkage plug-ins selected by provinces and cities
Shardingsphere proxy 5.0 sub database and sub table (I)
中國信通院沈瀅:字體開源協議——OFL V1.1介紹及合規要點分析
Application of global route guard
How to start the phpstudy server
炒股票开户的话,手机开户安全吗?有谁知道啊?