Stephan, I don't have the skills to fix your difficulty, but FWIW, I did reproduce your symptom using the database you provided in case that helps others diagnose it properly.
I used: -- SQLite version 3.15.0 -- official command line utility -- Windows 7 -- 16GB installed ram, plenty of hard drive I tried: -- PRAGMA temp_store set to default (zero), and again with it set to 1. -- Integrity check was OK. Regards, Donald G. ============================================== C:\Users\c058905\Downloads>sqlite3 lvd.db SQLite version 3.15.0 2016-10-14 10:20:30 Enter ".help" for usage hints. sqlite> pragma integrity_check ...> ; ok sqlite> PRAGMA temp_store=1; sqlite> PRAGMA temp_store; 1 sqlite> vacuum; Error: out of memory > > _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users