运行如下语句可以查询 SQL 流量分布情况及 QPS:

    1. obclient>SELECT/*+ PARALLEL(15)*/t2.zone, t1.svr_ip, COUNT(*) AS RPC_COUNT,
    2. AVG(t1.elapsed_time), AVG(t1.queue_time)
    3. FROM oceanbase.gv$sql_audit t1, __all_server t2
    4. WHERE t1.svr_ip = t2.svr_ip
    5. AND tenant_id = 1001
    6. AND SQL_ID = 'BF7AA13A28DF50BA5C33FF19F1DBD8A9'
    7. AND IS_EXECUTOR_RPC = 0
    8. AND request_time > (time_to_usec(now()) - 1000000)
    9. AND request_time < time_to_usec(now())
    10. GROUP BY t1.svr_ip;