On Thu, Dec 30, 2010 at 9:14 AM, Simon Slavin <slav...@bigfraud.org> wrote:
> > On 30 Dec 2010, at 5:16am, Max Vlasov wrote: > > > On Thu, Dec 30, 2010 at 3:23 AM, KimTaein <kti...@hotmail.com> wrote: > > > >> Thanks Simon but that PRAGMA did not work.... > >> > >> Eric: I am on Windows. Is there a way to force OS cache other than > >> restarting the machine? > >> > > > > Kim, there's is a trick on Windows. There's a flag FILE_FLAG_NO_BUFFERING > > for file opening that not only opens a file without caching it probably > > resets all existing cache for the same file > > Hold on, we are now talking about different type of cache. You can clear > SQLite's cache for a file by closing and reopening the file. No problem. > But Windows does not cache files by individual file handle. It caches disk > sectors (or pseudo-sectors), and has no idea which files the sectors belong > to. So any flag on opening a file isn't going to help that. > > Simon, the idea is that general Windows file open has the corresponding flag for not using a cache for particular opened file. I just thought that if Windows has no separately cashed entries for one file opened by different programs, it means that opening a file with this flag forces also to clear cache for following openings as well. The tests showed that this was true, so this flag quickly opens and closes the file not using sqlite api at all so sqlite opens it after that without system cache (and even don't knowing about my trick at all) Max _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users