On 2016-03-02 11:18 PM, R Smith wrote:
> 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.
>
> 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

Ryan, I think I was the one who actually previously said most of this stuff you 
are talking about, rather than Clemens, including about using WHERE and LIMIT 
and about consequences of OFFSET skipping or repeating lines due to other 
users' 
updates. -- Darren Duncan

Reply via email to