codecamp

OceanBase 查看分布式子计划 RPC 执行数是否均衡

运行如下语句可以查看分布式计划 RPC 执行数是否均衡:

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 IS_EXECUTOR_RPC = 1    
        AND tenant_id = 1001
        AND request_time > (time_to_usec(now()) - 1000000)    
        AND request_time < time_to_usec(now()) 
        GROUP BY t1.svr_ip ORDER BY t2.zone;

+--------+----------------+-----------+----------------------+--------------------+
| zone   | svr_ip         | RPC_COUNT | avg(t1.elapsed_time) | avg(t1.queue_time) |
+--------+----------------+-----------+----------------------+--------------------+
| ET2_1  | 10.103.224.119 |      2517 |             514.2241 |            13.5515 |
| ET2_1  | 10.103.226.124 |      2786 |            1628.0948 |            13.2915 |
| ET2_1  | 10.103.228.177 |      3068 |            1984.0238 |            12.9029 |
| ET2_1  | 10.103.229.107 |      3216 |             538.7646 |            12.8629 |
| ET2_1  | 10.103.229.94  |      2228 |             802.8577 |            13.4138 |
| EU13_2 | 10.183.78.113  |      2000 |             805.0485 |            13.0610 |
| EU13_2 | 10.183.78.86   |      3296 |            1115.0725 |            13.2700 |
| EU13_2 | 10.183.79.56   |      2460 |            1129.4085 |            14.3293 |
| EU13_2 | 10.183.85.152  |      2533 |             891.0683 |            13.8602 |
| EU13_3 | 10.183.76.140  |      3045 |             677.6591 |            13.7209 |
| EU13_3 | 10.183.78.165  |      2202 |             821.9496 |            12.8247 |
| EU13_3 | 10.183.79.198  |      2825 |            1277.0375 |            13.3345 |
| EU13_3 | 10.183.86.65   |      2142 |             746.0808 |            13.0121 |
| EU13_3 | 11.180.113.7   |      2735 |             765.8731 |            12.4750 |
+--------+----------------+-----------+----------------------+--------------------+
OceanBase 分析分布式计划相关的查询问题
OceanBase 查询改写概述
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

OceanBase 控制台指南

OceanBase ODC 使用指南

OceanBase Web 版 ODC

OceanBase 客户端版 ODC

OceanBase Connector/J 开发者指南

OceanBase 什么是OceanBase Connector/J

OceanBase SQL 参考(MySQL 模式)

OceanBase SQL 参考(Oracle 模式)

OceanBase 基本元素

OceanBase 数据库对象

OceanBase 函数

OceanBase 单行函数

OceanBase 返回数字的字符串函数

OceanBase 通用比较函数

OceanBase 编码解码函数

OceanBase SQL 调优指南

OceanBase 相关协议

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }