On 2016/03/03 5:10 AM, ?? wrote:
> So according to your answers and others, this limitation is always there even 
> the document said "obsolete" ? Just want to double confirm.
>
>
> Thanks!

To add to what Clemens already mentioned - this problem is not an SQLite 
problem, this problem is true and exists for ALL SQL databases. It is 
bad to use LIMIT and OFFSET for several reasons. Performance obviously, 
but also DB changes may alter the position within an offset that a line 
appears, which can make the user skip entire lines when scrolling to a 
next page, or the "Back" button might produce a different view than 
he/she had before.

If your DB is small and does not change often, then the above is all 
negligible and you can use it. But for any performant or large or 
frequently updated DB, it is a bad idea - in ALL SQL engines.

Speaking of all engines - some allow a scrolling cursor and some allow 
windowing functions that might be pressed into service mitigating the 
problem. It remains however faster to use WHERE and LIMIT as Clemens 
suggested in all cases I know of.


Cheers,
Ryan

Reply via email to