Someone correct me if I'm wrong, but ...

>   Could this improvement be different changing operating system?

Certainly.  You're benefitting from an OS that does file caching.  If you
switch to an OS with no file caching you'll lose the benefit.

>   When Is it convenient to use SQLite page-cache for large database
(example 4 gb) and in which terms?

Then two caches (OS file cache and SQLite page-cache) aren't really related.
SQLite's page cache is basically the amount of RAM it uses to load chunks of
the database in to scan/update/etc.  If it needs a chunk of the database
file that isn't already in memory it will read it from disk.  If the OS has
already cached that chunk of the database file in it's own memory space, the
'read' is really just an OS-level memory transfer, so it is very fast.  If
you happen to need to read something that is outside what the OS has cached,
then you are at the mercy of the spinning disk and head movement to pull
that data into your process (which means into the SQLite page cache).

The SQLite page-cache is always in use--it can't be turned off.  Using
pragmas you can tell it to use more or less memory if your process is the
only one on the box that needs it.  I suppose that turning it up too high
would be counterproductive as you'll eventually force the OS to start
swapping your memory out to disk just so it can keep everything else
running.



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to