Mark,
"Mark D. Anderson" <[EMAIL PROTECTED]> 22/03/2004 05:15 AM To: [EMAIL PROTECTED] cc: Subject: [sqlite] sqlite not sharing page cache across processes? > It appears from looking at pager.c that every process working > with a database acquires its own page cache by use of read(). > They independently keep their individual cache in sync by > playing back the (single) journal. ... > But is my understanding of the tradeoff correct? My reading of the code has the readers flushing their cache often, and not using the journal at all to maintain consistency. My reading has the reader start with nothing in the cache, lock the database with a read lock, perform as many SQL queries as are in the single text string it's currently parsing, and flush its cache around the time it unlocks the database. The cache remains valid only as long as the lock is in-place, and the operating-system is responsible for any caching between locks. Replay of the journal only occurs if a writer has terminated (lost its lock without committing or rolling-back its transaction). The next reader will roll-back the transaction by restoring original pages from the journal. Benjamin --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]