mysql 命令中查看执行的时间,优化sql查询

mysql 5.0以上版本开始支持profiling。mysql 使用步骤:sql 1 开启profiling参数 : set profiling=1; 2 执行sql 3 经过执行SHOW PROFILES 命令获取当前系统中保存的多个Query的profile的信息。(可选) 4 计算以前执行的sql时间总和:spa select sum(duration) as sum from infor
相关文章
相关标签/搜索