Re: [sqlite] How to retrieve number of cached pages in memory?

2008-04-22 Thread Ralf Junker
> See the "Pager" data structure and associated variables and functions > in "sqlite-3.5.x/src/pager.c". OK, it seems that the number I am interested in is stored as part of the Pager struct: int nPage; /* Total number of in-memory pages */ Now I just have to figure out

Re: [sqlite] How to retrieve number of cached pages in memory?

2008-04-22 Thread Richard Klein
You're right! A grep of the source code confirms that. My mistake. - Richard Jay A. Kreibich wrote: > On Tue, Apr 22, 2008 at 03:33:27PM -0700, Richard Klein scratched on the wall: >> You can call sqlite3_memory_highwater() to find >> the maximum amount of memory (in bytes) that your >> app has

Re: [sqlite] How to retrieve number of cached pages in memory?

2008-04-22 Thread Jay A. Kreibich
On Tue, Apr 22, 2008 at 03:33:27PM -0700, Richard Klein scratched on the wall: > You can call sqlite3_memory_highwater() to find > the maximum amount of memory (in bytes) that your > app has used. > > Then you can divide this number by 2000 (the default > size of a page) to determine the max numbe

Re: [sqlite] How to retrieve number of cached pages in memory?

2008-04-22 Thread Jay A. Kreibich
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 > m

Re: [sqlite] How to retrieve number of cached pages in memory?

2008-04-22 Thread Richard Klein
You can call sqlite3_memory_highwater() to find the maximum amount of memory (in bytes) that your app has used. Then you can divide this number by 2000 (the default size of a page) to determine the max number of pages that have been cached. - Richard Klein Ralf Junker wrote: > I need to retrieve

[sqlite] How to retrieve number of cached pages in memory?

2008-04-22 Thread Ralf Junker
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 page