On 12/12/06, John Stanton <[EMAIL PROTECTED]> wrote:
If you want to get as much as possible of the Sqlite database into
physical memory on the computer, read all of it.  If you just want to
preload the cache and VM so that the first user gets faster response
execute a dummy query like one you would expect the first user to run.

Since the VM logic will work on a least recently used algorithm the
preload using a read of the file will not be very successful if you have
a huge database and not much physical memory.  You will only have the
tail of the DB in physical memory.

My preference would be to execute a dummy query as part of the DB open.
  That would leave the cache primed with a working set of pages likely
to satisfy the first user query.  After that the cache takes care of
itself.  This method not only primes the Sqlite cache but also makes the
pages resident in physical memory.  Reading the file alone does not
prime the Sqlite cache.

That sounds like an excellent idea. I did assume it was the operating
system disk cache that was being primed, that may not be correct.

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to