mysql优化相关

mysql 可以使用field函数进行自定义排序

格式为:
select * from table   order by field(str1,str2,str3,str4);

查看一条sql语句实际使用时间

set profiling=1;

 

show profiles;
show profile;
show profile for query 3; #查看第三条sql语句的具体执行情况
原文地址:https://www.cnblogs.com/Esquecer/p/12296722.html