> I was thinking that caching of pages is SQLite's implementation and nothing > to do with the OS. I'd think the cache is associated with each database > connection and Sqlite caches all the pages it reads until the maximum > limit. Is this the correct understanding?
Yes, this is the correct understanding. Maybe Simon meant the case when you have other tables in the database and later will try to work with them. > I thought about in memory databases. But technically, caching pages at > SQLite level or using an in-memory database makes no difference here, > rigtht? It makes no difference if you use pragma locking_mode = exclusive while working with on-disk database. Otherwise working with in-memory database will be faster. Pavel On Wed, May 9, 2012 at 8:30 AM, Navaneeth.K.N <navaneet...@gmail.com> wrote: > Hello, > > On Wed, May 9, 2012 at 5:15 PM, Simon Slavin <slav...@bigfraud.org> wrote: > >> >> Sure. That would cache the data. And then the next thing that needs to >> be cached might overwrite it all again. You're messing with something that >> your OS thinks it has sole control over. >> > >> > Are there any API functions that will tell how many pages are currently >> > cached, cache misses etc..? >> >> The problem with this is it will change from run to run. Sometimes your >> program will be the only thing running. Other times other apps will be >> open. Sometimes they'll be printing in the background. Sometimes the OS >> will be defragging in the background. Sometimes a virus-checker will >> spring into action. Sometimes the computer will be left idle and a >> screensaver will start up. >> > > I think I am missing something here. > > I was thinking that caching of pages is SQLite's implementation and nothing > to do with the OS. I'd think the cache is associated with each database > connection and Sqlite caches all the pages it reads until the maximum > limit. Is this the correct understanding? If yes, how will other > applications starting or doing some work in background affects SQLite's > cache? > > When documentation says SQLIte caches pages, are we talking about operating > system level paging and caching? > > I thought about in memory databases. But technically, caching pages at > SQLite level or using an in-memory database makes no difference here, > rigtht? > > BTW, this database is used only for reads. Writes are performed only one > time. > > Thanks > -- > -Navaneeth > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users