开启慢查询日志
set global slow_query_log=1
设置慢查询时间
set long_query_time=5
打开profiling功能
set profiling=1
查看执行的SQL语句
show profiles
查看相应语句执行时间
show profile cpu,block io for query 6
查看SQL语句执行详情
explain select * from table where id = 1
开启慢查询日志
set global slow_query_log=1
设置慢查询时间
set long_query_time=5
打开profiling功能
set profiling=1
查看执行的SQL语句
show profiles
查看相应语句执行时间
show profile cpu,block io for query 6
查看SQL语句执行详情
explain select * from table where id = 1