On Wed, Mar 16, 2011 at 4:12 PM, Travis Orr <t...@ivl.com> wrote:
> Jim, just did a test with your recommendation, however that ended up
> using too much memory, since it is selecting the entire list in on go
> and keeping the memory for a significant amount of time, for the
> embedded system it is running on. Other tasks started having problems.
>
> Travis

I think it should only use cachesize*pagesize memory, so you should be
able to control memory usage with pragma cache_size.

Jim
--
HashBackup: easy onsite and offsite Unix backup
http://www.hashbackup.com


>
> -----Original Message-----
> From: sqlite-users-boun...@sqlite.org
> [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Jim Wilcoxson
> Sent: March-16-11 12:51 PM
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] Optimizing list retrieval with a FTS3 table
>
> On Wed, Mar 16, 2011 at 3:15 PM, Travis Orr <t...@ivl.com> wrote:
>> I am currently working on a project that requires retrieving a list of
>> all the rows from a FTS3 table. The ordering of the results varies by
>> search criteria. Since this is for an embedded project the list
> results
>> are passed in chunks to another module to give the appearance of
> faster
>> operations.
>
> Somewhere you have some state information so that you know what offset
> to use.  Store the SQLite cursor with that state information, and use
> it to fetch the next 2000 rows on each call, ie, only do the query
> once.
>
> Jim
> --
> HashBackup: easy onsite and offsite Unix backup
> http://www.hashbackup.com
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to