[wp-hackers] Incremental rows retrieval

Justas Butkus jbutkus at time.ly
Mon Nov 18 08:04:11 UTC 2013


Hello.

It is just an extension over the mentioned `WHERE primary_key > 
$last_value ORDER BY primary_key ASC`. In that case LIMIT will likely be 
used, just with one index, for example `LIMIT 100`, instead of `LIMIT 
$last_count, 100`. The difference is that LIMIT on it's own is not as 
efficient as approach with LIMIT solely (see [1] and [2] bellow for some 
authoritative details). And that doesn't void inconsistency probability, 
as I mentioned.

Thanks for taking time.


-- 
Regards,
Justas Butkus

[1]: 
http://www.mysqlperformanceblog.com/2006/09/01/order-by-limit-performance-optimization/
[2]: 
http://www.percona.com/pdf-canonical-header?path=files/presentations/ppc2009/PPC2009_mysql_pagination.pdf

2013.11.17 00:34, Tyrel Kelsey rašė:
> Is there any reason you can’t use MySQL’s limit described here http://dev.mysql.com/doc/refman/5.0/en/select.html ?



More information about the wp-hackers mailing list