On Thu, 3 May 2012 10:42:38 -0700 (PDT), msantha <rssmadha...@gmail.com>
wrote:

>
> I am using sqlite in my application only for read access. The DB gets hit
> often by my application and I could see that the header(100 bytes) of the
> database is read every time when i access the database.
> Precisely speaking, 16 bytes from the 24th byte of the header is read
> everytime. My question is , if the database is used only for read purpose,
> why the header is read everytime as the database connection is not
> closed?..

Your process may promise that it will only read the database, but there
might be some other process writing to it.
Not being a server, sqlite has no other way to find that out than by
reading the header over and over again. It has to check whether the
schema was changed, or whatever other info is in those bytes.

> can we make it read it only once?

I don't think so, unless you patch the source code.
I wouldn't worry about it too much, the operating system will notice
that particular page is read often and keep it in it's file system
cache, so access is fast.

> Thanks!!

Hope this helps.

-- 
Regards,

Kees Nuyt

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

Reply via email to