<[EMAIL PROTECTED]> wrote: > ---- [EMAIL PROTECTED] wrote: > > <[EMAIL PROTECTED]> wrote: > > > I completed my analysis of the SQLite database memory usage and I was > > > surprised to find that SQLite consumes so much memory. I ran my test > > > case (creates 31 tables) and found that SQLite consumed 545,231 bytes > > > of malloced memory before it started giving it back. > > > > > > > 100K? yes. 20K? no. > > > What is the set of commands to do this? > Ray >
There is no "command" to make SQLite use less memory. Rather you have to use careful engineering to keep the memory usage to a minimum. Start with this: PRAGMA default_cache_size=10; Then close your connection and reopen it and do this: PRAGMA cache_size; Verify that you got a "10" back so that the change took. When you compile, you will want to leave out as much stuff as you do not need using SQLITE_OMIT_* flags. You will want to take care in your use of SQL so that you do not specify SQL statements that inherently require a lot of memory. You'll probably want to make use of sqlite3_soft_heap_limit() and sqlite3_release_memory(). Stay far, far away from sqlite3_get_table(). And so forth. -- D. Richard Hipp <[EMAIL PROTECTED]> ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------