OceanBase 查找某个租户中执行全表扫描的 SQL
运行如下语句可以查询某个租户中执行全表扫描的 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' |
+-------------------------------+