On Wed, Apr 23, 2008 at 12:19:45AM +0200, Ralf Junker scratched on the wall:
> I need to retrieve the number of pages a SQLite database connection has 
> currently allocated in memory. The documentation unfortunately turned up
> no results. I know about "PRAGMA cache_size", but this returns the
> maximum number of pages possibly allowed in the cache, not the actual
> number of pages currently cached.
> 
> My aim is to calculate the accurate number of bytes actually consumed by
> a single cached page. This figure will then allow to set PRAGMA
> cache_size to a more precise value in order to limit memory usage.
> 
> I do mind using undocumented APIs and will not cry tears if they
> change without notice, so any pointers are welcome!

  See the "Pager" data structure and associated variables and functions
  in "sqlite-3.5.x/src/pager.c".

   -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"'People who live in bamboo houses should not throw pandas.' Jesus said that."
   - "The Ninja", www.AskANinja.com, "Special Delivery 10: Pop!Tech 2006"
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to