On 2/1/2017 9:50 AM, Anthrathodiyil, Sabeel (S.) wrote:
I am facing issue with SQLite performance when having more records in the table
and fetching from higher offsets
https://www.sqlite.org/cvstrac/wiki?p=ScrollingCursor
Performance of a query with OFFSET N is roughly equivalent to that
without OFFSET clause, where you retrieve and discard first N rows.
SQLite has no means to jump directly to row N.
My understanding is, since index table is created in the sorted order, time to
fetch from any offset should be the same.
Your understanding is incorrect. Imagine that you have a phonebook, with
people's names listed in alphabetic order. This makes it easy to find an
entry for a particular name, but doesn't help at all with finding an
entry number N; for that, you still have to start from the first entry,
and count them one by one.
--
Igor Tandetnik
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users