Sqlite3 in embedded system - process memory increase? Sqlite3 in embedded system - process memory increase? sqlite sqlite

Sqlite3 in embedded system - process memory increase?


I determined after a few days that you can use a pragma upon database creation or prior to connection opening to mitigate this issue. I'll post it as an accepted answer since no-one even commented on this question since its posting.

Set this through the sqlite3 interface and set it to 0 or a number you like more.

PRAGMA cache_size=0; 

to stop the process memory from growing according to the database size. Apparently, even though there are "default" caching limits, they either were disabled or just not working in our implementation - possibly due to compilation options used while cross-compiling sqlite3. Setting the pragma makes it properly enforce the limits to stop the process size growth.

Here's a reference for more info:

http://www.sqlite.org/pragma.html#pragma_cache_size