天天看點

mysql 如何檢視sql語句執行時間

1 show profiles; 

2 show variables;檢視profiling 是否是on狀态; 

3 如果是off,則 set profiling = 1; 

4 執行自己的sql語句; 

5 show profiles;就可以查到sql語句的執行時間;

執行個體操作: