-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 26/09/12 01:15, Sebastian Krysmanski wrote: > 1. I understand that the WAL file is stored on the disk.
During a transaction the old pages and the new pages will both be present at some point no matter what mode is used. Consequently you should expect maximum usage to be around the size of your existing data plus twice the size of the changes you are undertaking while usage outside of a transaction will be roughly existing data plus changes. Worst case would be something like changing a value on every single page. Best case would be adding new data with no indices. > It says in the documentation: 1000 pages. How big is a page? 1kb default. http://www.sqlite.org/pragma.html#pragma_page_size > Also, does WAL has any (significant) memory consumption (per > connection/thead, or dependent on the WAL file size)? There is some but not really significant. > 2. I'm guessing a SQLite cache (connection private > [SQLITE_OPEN_PRIVATECACHE] or shared [SQLITE_OPEN_SHAREDCACHE]) is > stored in memory only (i.e. not on the disk), right? What's its size in > memory? Or, on what factors does this size depend on? SharedCache is about sharing the cache memory between connections in the same process. It is unlikely you'll ever want to do this, or even benefit from it if you did use it. The default cache size is 2MB from sqlite.org - - I haven't checked to see what value Android changed it to. Many of the system apps, and a lot of others apps are using SQLite behind the scenes. You are not the first developer by a long shot. Remember that the first Android phones allocated 16MB per process for everything. I recommend you just go ahead and use SQLite as the Android system intends you to. Actually I recommend you expose things as a ContentProvider and use SQLite behind the scenes. It is trivial to use SQLite on Android. Note that the library code does some things behind your back such as dealing with collation registrations to make sorting consistent. (If you ever .dump a database that was created on Android you can see that.) Start with this class that helps manage the schema on your database, as well as creating the database in the right place: http://developer.android.com/reference/android/database/sqlite/SQLiteOpenHelper.html Roger -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAlBjbWgACgkQmOOfHg372QQUmACfTE4NyVslAFHDkNfiwPvgBP6w uO0AoJ/YFlZ1a2y0ne3Lk0GCJy781WqG =48fo -----END PGP SIGNATURE----- _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users