运行如下语句可以查询 SQL 流量分布情况及 QPS:
obclient>SELECT/*+ PARALLEL(15)*/t2.zone, t1.svr_ip, COUNT(*) AS RPC_COUNT,
AVG(t1.elapsed_time), AVG(t1.queue_time)
FROM oceanbase.gv$sql_audit t1, __all_server t2
WHERE t1.svr_ip = t2.svr_ip
AND tenant_id = 1001
AND SQL_ID = 'BF7AA13A28DF50BA5C33FF19F1DBD8A9'
AND IS_EXECUTOR_RPC = 0
AND request_time > (time_to_usec(now()) - 1000000)
AND request_time < time_to_usec(now())
GROUP BY t1.svr_ip;
备案信息: 粤ICP备15087711号-2
Copyright © 2008-2024 啊嘎哇在线工具箱 All Rights.
本站所有资料来源于网络,版权归原作者所有,仅作学习交流使用,如不慎侵犯了您的权利,请联系我们。