Am Montag, den 22.11.2010, 01:24 +0000 schrieb Simon Slavin:
> On 22 Nov 2010, at 12:49am, boscowitch wrote:
> 
> > now i switched to an Fulltext search table FTS3 which improved speed
> > drastically but it now need over ~15s on my 3Ghrz to load all entrys
> > into the ram FTS3 table (with simple tokenizer).
> > (the current code is in this db.c file in the init_db function
> > http://github.com/boscowitch/wadoku-notify/blob/master/src/db.c ) 
> > 
> > now i wanted to ask if i precreate the indexed table into the db file
> > how i can load/copy this table into a :memory: db without regeneratig
> > the whole index.
> 
> This may seem silly, but are you absolutely sure you need to load the 
> database into memory ?  I've seen some apps which to go great lengths to do 
> this but hardly slow down at all just accessing the database from disk.  If 
> you take the memory you were storing the database in, and use if for disk 
> caching instead you can get pretty good speeds just using FTS3 as intended.
> 
> Simon.

In Linux i had almost no problem without cachign and FTS3, because the
kernel caches, only after using some big app it was slow at first so i
forced it into ram.

on windows without any caching it was unbearable slow it allways took
20s or so...

havn't tested it with FTS3 and without copying it into ram, but i will
test it in windows, which will be the most slowest(exepct maby on maemo
on my n900 mobile where it now runs reasonable thanks to FTS3 ~0,5s
before 30s for one search).

does FTS3 some caching of its index. ? or can i force it to ? i guess
the index wold be enough
because reading one small entry from it's id will probably be fast
enough.



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

Reply via email to