--查看当前的mysql版本是否支持
show variables like 'profiling%';
--默认关闭,使用前需要开启
set profiling=on;
--运行耗时久的sql
SELECT DISTINCT io.housing_id FROM t_device_report_message re LEFT JOIN t_device_io io ON re.device_id = io.device_id WHERE io.housing_id is not null
--查看当前的mysql版本是否支持
show variables like 'profiling%';
--默认关闭,使用前需要开启
set profiling=on;
--运行耗时久的sql
SELECT DISTINCT io.housing_id FROM t_device_report_message re LEFT JOIN t_device_io io ON re.device_id = io.device_id WHERE io.housing_id is not null
相关文章: