Mysql SQL Performance Optimization-order mysql's order will be affected by the amount of data selected during sorting. The more data columns, the slower the sorting. To illustrate this problem, see several examples. Low performance: select id, job_name from test_results where id <96836230 order by id desc limit 390; 1 rows fetched (MS) High Performance: select id, job_name from test_results where id = (select id from test_results where id <110836230 order by id desc limit 281) limit 1; 1 rows fetched (MS) Efficient paging query www.2cto.com low performance: select id, job_name from test_results order by id desc limit 1200000,100; 100 rows fe Tched (34.616 sec) High Performance: select id, job_name from test_results join (select id from test_results order by id desc limit 1300000,100) as t2 using (id); 100 rows fetched (5.460 sec) next, let's analyze the cause. First, start from the execution sequence of mysql, and start from top to bottom: www.2cto.com FROM <left_table> ON <join_condition> <join_type> JOIN <right_table> WHERE <where_condition> group by <group_by_list> HAVING