Are these multiple tables in a single database (file), or multiple databases 
(files)?  Multiple connections or a single connection?

In any case, you set the cache size in pages by executing "PRAGMA 
cache_size=<pages>" after opening the database connection.  

You can test it without modifying your code by executing "PRAGMA 
default_cache_size=<pages>;" against the database file using the shell.

The default sqlite page cache per database connection is 2000 pages.  So the 
maximum memory used by sqlite for the page cache is  page_size * cache_size.  
You can query these with "pragma page_size" and query/set the cache size with 
"pragma cache_size".

Also note that the page_cache tied to the connection.

---
()  ascii ribbon campaign against html e-mail
/\  www.asciiribbon.org


> -----Original Message-----
> From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
> boun...@sqlite.org] On Behalf Of Bo Peng
> Sent: Monday, 25 June, 2012 19:34
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] How to know the memory usage of an in-memory database.
> 
> On Mon, Jun 25, 2012 at 8:29 PM, Keith Medcalf <kmedc...@dessus.com> wrote:
> > What OS is it that does not have a block disk cache?
> >
> > Have you tried simply allocating a large page cache?
> 
> The application is cross-platform (python / sqlite / C). I frankly do
> not know how to create large page cache to accomplish what I need.
> Could you elaborate?
> 
> Thanks,
> Bo
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users



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

Reply via email to