Hi all, I am very happy with the inclusion of LSM extension in sqlite3's code base. I have a question regarding the merging of segments within the database.
I noticed that autowork enabled was not enough for keeping disk consumption at bay, the generated database was N times larger than the generated by sqlite3. Using lsm_work(db,1-1,0) after every transaction seems to mitigate this and the disk footprint of the db gets back to normal. This seem to be explained by Mr. Kennedy here http://www.sqlite.org/src4/doc/tip/www/lsmusr.wiki#explicit_scheduling * What does exactly do lsm_work(db,1,-1,0) ? My assumption is that it merges all the on disk segments into one larger segment, is this correct? * Doing this after every transactions of course takes some tool on performance and everything goes significantly slower. What is the best way of running lsm_work? in a separate thread like it is mentioned in sqlite4's documentation? http://www.sqlite.org/src4/doc/tip/www/lsmusr.wiki#explicit_scheduling * Finally, can I call lsm_work less aggressively in terms of parameters? I am worried about virtual memory consumption so I'd rather not do a full lsm_work every time, something like.. merge until there are no more elements with delete markers on it? Thanks! _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users