The New Year's egg pain, so look at MySQL optimization, read a lot on the internet on the optimization method of pagination, but, I personally try on a time, did not appear they said the phenomenon ... Is it my machine problem?
Take a look at my practice record, want to see join in Exchange O (∩_∩) o~
The following practices are advocated by regular paging and online advocates:
offset is less than the hour :
General Practice
It can be seen that when the limit offset is smaller, the execution time of the page with the conventional procedure is 0.01s.
When the limit offset is small, another special method is used, in which case it is indeed in line with the recommended practice of
Use limit x, y directly when limit offset is small
when offset is larger :
You can see that the conventional approach is time consuming 0.47s
When using the recommended optimization method, time consuming 0.79s, is not offset is not big enough??
MySQL Optimization note pagination