> Le 31 mai 2018 à 13:34, x <tam118...@hotmail.com> a écrit : > > Clemens, when I change to ullAvailVirtual the figure stays pretty much the > same throughout the programme as you suggested. I still don’t understand the > ullAvailPhys numbers though. Why would window’s increase it’s cache size > during step ascending then reduce it during step descending in such a > consistent manner?
While SQLite reads more and more rows from your database, Windows caches more and more pages from the file, explaining the physical available memory diminishes, which does not mean SQLite, nor your program 'use' it: the OS does. The fact the available physical memory goes up, probably because Windows reduces its disk cache, while doing the second loop of your program is certainly trickier to explain / understand, but it obviously is plausible - as it happens. :) I wouldn't be surprised SQLite reuse temporary file data in the second phase, and such temporary files are typically managed differently by the OS (when created with the right set of system flags, which I think SQLite use) : that is through virtual memory mapping of the file content, bypassing the filesystem usual cache, which in turn being put to less stress might be progressively freed by Windows while the second pass run. Though this is only a wild supposition. End to end it only means two things : 1) your computer and OS does apparently work correctly and at least makes use of the resources at hand and 2) getting to the bottom-line of this would be much easier with source code of Windows. -- Best Regards, Meilleures salutations, Met vriendelijke groeten, Olivier Mascia _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users