标签:
LIMIT语句优化
原语句:SELECT * FROM table ORDER BY id DESC LIMIT 190000,10000
优化后:SELECT * FROM table WHERE id < (SELECT MIN(alias.id) FROM (SELECT id FROM table ORDER BY id DESC LIMIT 190000) alias) ORDER BY id DESC LIMIT 10000
标签:
原文地址:http://www.cnblogs.com/leehope/p/4531490.html