搜索某个用户的TopN慢查询
select query_time,query,user
from information_schema.slow_query
where is_internal=false -- 排除 TiDB 内部的慢查询 SQL
and user = "user1" -- 查找的用户名
order by query_time desc
limit 2;
搜索某个用户的TopN慢查询
select query_time,query,user
from information_schema.slow_query
where is_internal=false -- 排除 TiDB 内部的慢查询 SQL
and user = "user1" -- 查找的用户名
order by query_time desc
limit 2;