On Wed, Nov 2, 2011 at 2:13 PM, Fabian <fabianpi...@gmail.com> wrote: > 2011/11/2 Nico Williams <n...@cryptonector.com> >> But note that this can still fail you when the file is larger than >> available RAM. In that case such a flag would be very bad. And >> SQLite3 can't know how much RAM is available. The OS can know >> (sortof) and the user can know, but SQLite3 can't. So I take the >> above back -- such a flag would probably result in posts about how >> SQLite3 startup causes thrashing... > > If the flag would respect the cache_size pragma, it could work very well. I > currently set the cache_size to 300MB (72k x 4096 pages), and the database > size on disk is only 125 MB, so it would fit in perfectly. People that > never changed the default cache_size, will never experience any trashing, > because theyre database will not be pre-cached, since it doesnt fit into > cache.
That's true, though the reading in of the file would have to be delayed till you set the cache_size. I'd be happy with such a thing. And if the cache_size is smaller than the file size, then make this do nothing. Nico -- _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users