On 09/20/2018 03:05 AM, Roger Cuypers wrote:
I think it does at some point. I’m at home right now so I have to check this 
again tomorrow when I have access to the source.

Should there be rbu calls if the application is only _reading_ fro the database 
and not updating?

Maybe. If the app called sqlite3rbu_create_vfs() to add an RBU VFS to the VFS stack. AFAIK the only reason to do this is if you are using ZipVFS.

Are you using ZipVFS?

Dan.




Am 19.09.2018 um 21:48 schrieb Dan Kennedy <danielk1...@gmail.com>:

On 09/20/2018 01:49 AM, Roger Cuypers wrote:
I'm trying to optimize a C++ application that uses sqlite 3 for database 
access. As far as I know it uses journaling with WAL and has a lot of 
files/tables (about 400). Profiling this application with Linux perf, I found 
that it spends about 30% of its time inside the rbuFindMaindb function of 
SQlite3. This function mostly consists of a loop that goes through all of the 
journaling WAL files in the virtual file system, so it seems that in order to 
bring down the cost of said loop I would have to reduce the number of WAL 
files. Seeing that apparently sqlite creates a WAL for every database file, I'm 
not aware how to fix this.

Now my question: How can I optimize this? Can I reduce the number of WAL files 
without reducing the number of database files? Is there a different journaling 
mode that does not call rbuFindMaindb so often? Can I optimize my program so 
that this function is called less often?

Are you actually using the RBU extension?

 https://www.sqlite.org/rbu.html

Has your application called any sqlite3rbu_*() APIs?

Dan.

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

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


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

Reply via email to