Almost, but when you compare to a telephone directory, then the use case of
fast scrolling down in a listbox would be going directly to page 800 and not
going to  "Smithson".

And yes, there is a unique key, but this doesn't help, because the list can also be sorted to various columns.


Am 24.05.2017 um 10:27 schrieb Keith Medcalf:
You need to write your application like a telephone directory.  To get to
the page with the "Smithson" entry on it, you do not read all the entries
starting from the begining until you get there -- you turn directly to the
page you want by doing a search.

Surely you have a unique key for the list?

-- ˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı
-----Original Message----- From: sqlite-users
[mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Thomas
Flemming Sent: Wednesday, 24 May, 2017 02:09 To:sqlite-users@mailinglists.sqlite.org Subject: [sqlite] SQLite3.Step
fast forward / skipping rows

Hi SQLite Users,


I have a SELECT query, which returns some 100000 records and is
displayed in a scrollable ListView.

When the user scrolls down the list, each new row is loaded with SQLite3.Step().

The problem is, when the user scrolls fast with the scroll-slider, lots
of rows are skipped, but SQLite still needs to load them all with SQLite3.Step until it reaches the row which is actually needed. This is
very slow.

Is there a way to skip all these unnecessary rows? For example going directly from row 1000 to row 100000 ? I tried SELECT ... OFFSET 100000
but this is also very slow the more down we go.

Thanks Tom




_______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sql

--
/****************************************
**   Flemming Software Development CC
**   Thomas Flemming
**   PO Box 81244
**   Windhoek, Namibia
**   http://www.quovadis-gps.com
**   mail  t...@qvgps.com
**   +264 (0)81 3329923
**   +49  (0)6182 8492599
***************************************/
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to