On Tue, Aug 9, 2011 at 9:27 AM, Jaco Breitenbach <jjbreitenb...@gmail.com>wrote:

> Unfortunately the performance rate of the inserts
> into the indexed tables decreases significantly as the number of records in
> the tables increases.  This seems to be because of a CPU bottleneck rather
> than I/O while doing the searches.
>

This is a locality of reference problem.  The caching mechanisms (both in
SQLite and in the filesystem of your computer) begins to break down when the
size of the database exceeds available RAM.  And when the cache stops
working well, you have to wait on physical I/O which is very slow.

We do not yet have a solution for inserts into an indexed table.  But, if
you insert into an unindexed table, then afterwards run "CREATE INDEX", the
experimental code on this branch -
http://www.sqlite.org/src/timeline?p=eec8c0df075d3a54 - is about two orders
of magnitude faster.


-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to