Wednesday, October 28, 2009

How to change where sqlite3 puts it's temporary files

I recently was running out of space on the /var partition when trying to run a sqlite3 query. I tried to vacuum the database, but that also ran out of space. (Duh.) With a bit of digging, I discovered how to tell sqlite where to put the temp files:
sqlite3 ./mydb.db "PRAGMA temp_store_directory='/usr/'; vacuum"

No comments:

Post a Comment