性能分析

查看数据库是否开启性能分析的开关

select @@have_profiling;

查看sql语句具体性能

# 查看sql语句的耗时
show profiles;

show profile for query query_id;

show profile cpu for query query_id;

image-20250901225635397