Hi,
I'm looking into adding cache statistics (at the pager level) to SQLite
to try to better understand how often SQLite is 'hitting' the disk for a
particular application. Two ways I've considered doing this are:
1. Add a static array to SQLite and populate from function
'pagerAcquire'. - Pros: Simple - Cons: Not particularly accessible,
resides in memory, harder to dynamically adjust
2. Using some sort of special table (similar to sqlite_master) and
populate using SQL. - Pros: Data accessible from application. Cons: Not
sure where to start
At this stage I'm only looking to record primitive information. If, for
example, we went down route 2, below could be a suitable table
definition.
"CREATE TABLE sqlite_cache_stats(\n"
" total_page_reads_from_cache integer,\n"
" total_page_reads_from_disk integer,\n"
" session_page_reads_from_cache integer,\n"
" session_page_reads_from_disk integer\n"
")"
Where 'total_*' fields are kept for the life of the database file and
"session_*" are kept for the life of the connection, resetting on
opening the database.
I would appreciate some suggestions on how to progress this. Perhaps
something similar may already exist, so any pointers would be beneficial
Thanks
Nick
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------