OceanBase 查找某个租户中执行全表扫描的 SQL
2021-06-30 11:45 更新
运行如下语句可以查询某个租户中执行全表扫描的 SQL:
obclient>SELECT query_sql
FROM oceanbase.gv$sql_audit
WHERE table_scan = 1 AND tenant_id = 1001
GROUP BY sql_id;
+-------------------------------+
| query_sql |
+-------------------------------+
| SHOW VARIABLES LIKE 'version' |
+-------------------------------+
以上内容是否对您有帮助:
更多建议: