SQLite Forum

PRAGMA temp_store_directory
Login
While the PRAGMA is deprecated, I doubt that DRH will be getting rid of it anytime soon.  If you are going to use the PRAGMA, call it before you start any threads or open any connections.

However, I would prefer the usage of the TMPDIR or SQLITE\_TMPDIR environment variables as they would seem to be the least likely to change in the future and this then becomes part of the setup of the application environment rather than a part of the application itself, and hence easier to document in case someone else needs to touch it in the future ... and I would use SQLITE\_TMPDIR for the same reasons as it is more obvious that it has limited scope ...