From 30963453c59ce8085b9ec0bb0b86d73f6684a13f Mon Sep 17 00:00:00 2001
From: drh PRAGMA temp_store;
- Query or change the setting of the "temp_store" flag affecting
- the database for the duration of the current database connection.
- The temp_store flag reverts to its default value when the database
- is closed and reopened. For additional information on the temp_store
- flag, see the description of the
- default_temp_store pragma. Note that it is possible for
- the library compile-time options to override this setting.
-
-
- PRAGMA temp_store;
-
PRAGMA temp_store = DEFAULT; (0)
-
PRAGMA temp_store = MEMORY; (2)
-
PRAGMA temp_store = FILE; (1)
PRAGMA temp_store = DEFAULT; (0)
-
PRAGMA temp_store = MEMORY; (2)
-
PRAGMA temp_store = FILE; (1)
PRAGMA temp_store = DEFAULT; (0)
+
PRAGMA temp_store = FILE; (1)
+
PRAGMA temp_store = MEMORY; (2)
Query or change the setting of the "temp_store" parameter. - When temp_store is DEFAULT (0), the compile-time value of the - symbol TEMP_STORE is used for the temporary database. When - temp_store is MEMORY (2), an in-memory database is used. - When temp_store is FILE (1), a temporary database file on disk - will be used. See PRAGMA - temp_store_directory for further temporary storage options when + When temp_store is DEFAULT (0), the compile-time C preprocessor macro + TEMP_STORE is used to determine where temporary tables and indices + are stored. When + temp_store is MEMORY (2) temporary tables and indices are kept in memory. + When temp_store is FILE (1) temporary tables and indices are stored + in a file. The + temp_store_directory pragma can be used to specify the directory + containing this file. FILE is specified. When the temp_store setting is changed, - all existing temporary tables, indices, triggers, and viewers are + all existing temporary tables, indices, triggers, and views are immediately deleted.
-It is possible for the library compile-time symbol - TEMP_STORE to override this setting. The following table summarizes - this:
+It is possible for the library compile-time C preprocessor symbol + TEMP_STORE to override this pragma setting. The following table summarizes + the interaction of the TEMP_STORE preprocessor macro and the + temp_store pragma:
-TEMP_STORE | temp_store | temp database location |
---|---|---|
0 | any | file |
1 | 0 | file |
1 | 1 | file |
1 | 2 | memory |
2 | 0 | memory |
2 | 1 | file |
2 | 2 | memory |
3 | any | memory |
++ ++
++ TEMP_STORE +PRAGMA +
temp_storeStorage used for
TEMP tables and indices+ 0 +any +file + 1 +0 +file + 1 +1 +file + 1 +2 +memory + 2 +0 +memory + 2 +1 +file + 2 +2 +memory + 3 +any +memory
PRAGMA temp_store_directory;
PRAGMA temp_store_directory = 'directory-name';
Query or change the setting of the "temp_store_directory" flag affecting - the database for the duration of the current database connection. - The temp_store_directory flag reverts to its default value when the database - is closed and reopened. Setting temp_store_directory allows control of the - placement of temporary files created by SQLite when PRAGMA - temp_store is FILE (1), - or when the compile time default temporary store is FILE. - Otherwise, when the temp_store (or default) setting is - MEMORY (2), setting temp_store_directory has no effect.
+Query or change the setting of the "temp_store_directory" - the + directory where files used for storing temporary tables and indices + are kept. This setting lasts for the duration of the current connection + only and resets to its default value for each new connection opened.
When the temp_store_directory setting is changed, all existing temporary tables, indices, triggers, and viewers are immediately deleted. In @@ -315,7 +320,7 @@ puts {
The value directory-name should be enclosed in single quotes. To revert the directory to the default, set the directory-name to - a null string, e.g., PRAGMA temp_store_directory = ''. An + an empty string, e.g., PRAGMA temp_store_directory = ''. An error is raised if directory-name is not found or is not writable.
@@ -438,6 +443,18 @@ puts { SQLite library on and off. This is used for debugging. See the VDBE documentation for more information.PRAGMA vdbe_listing = ON; (1)
+
PRAGMA vdbe_listing = OFF; (0)
Turn listings of virtual machine programs on and off. + With listing is on, the entire content of a program is printed + just prior to beginning execution. This is like automatically + executing an EXPLAIN prior to each statement. The statement + executes normally after the listing is printed. + This is used for debugging. See the + VDBE documentation for more + information.