How is the "LIMIT 50,000.1"?

So LIMIT 50000,1won't work well? Then how did it happen? What if lines after several lines are required?

I read it at http://www.mysqlperformanceblog.com/2006/09/01/order-by-limit-performance-optimization/

+3
source share
2 answers

If you specify LIMIT, MySQL will process the request without restriction, and then just read ahead until it reaches the limit point.

In other words, if you specify LIMIT 50000,1, the database will need to read 50,001 records to get the one that interests you.

, , .

, ( ).

, , , , , , , , , LIMIT 50000,1 ( , )

+4

, , . , id where id > last_id limit 20 limit 5000, 20.

LIMIT. , , - , , LIMIT. , LIMIT . LIMIT 1000,10, , , LIMIT 0,10. , 10 , . , 200+ . - , DOS - . , .

, , , , . LIMIT 1000,10 1000 1009 ​​ ( )

+2

Source: https://habr.com/ru/post/1770517/


All Articles