1. 程式人生 > >如何檢視 mqsql中的sql的執行時間的長短

如何檢視 mqsql中的sql的執行時間的長短

SHOW VARIABLES LIKE "%pro%";  //  檢視profile是不是開啟的  ON 開啟  off 關閉

SET profiling = 1;    // 開啟 profiles 

執行sql     如:SELECT COUNT(createtime) FROM  who_user_function;

show  profiles; // 檢視該sql的執行時間