SQLite Pragma syntax

Source: Internet
Author: User
Tags call back

Pragma:
1. Pragma auto_vacuum = 0 | 1. Set automatic file scaling.
2. Pragma cache_size = number-of-pages;
Query or modify the number of database files stored in the memory in SQLite.
The change is only valid for the current session. When the database is closed. Invalid
3. Pragma case_sensitive_like = 0 | 1
Case Insensitive?
4. Pragma count_changes = 0 | 1
When it is enabled, an integer that affects the number of rows is returned.
5. Pragma default_cache_size = number-of-pages;
Change the cache size permanently.
6. Pragma empty_result_callbacks = 0 | 1;
Call call back function?
The database created by the attach command uses the same encoding format as the primary database.
7. Pragma full_column_names = 0 | 1;
If the short-column-names and full-column-names tags are set at the same time, the full-column-names mode is used.
8. Pragma fullfsync = 0 | 1
Determine whether to use f_fullsync synchronization mode on supported systems
9. Pragma page_size = bytes
Page-size can be set only when no database is created. The page size must be an integer multiple of 2 and greater than or equal to 512 and less than or equal to 8192.
10. Pragma read_uncommitted = 0 | 1
Query, set or clear read uncommitted isolation (read unauthorized separator ).
11. Pragma short_column_names = 0 | 1;
Query or change the short-column-names tag
12.
Pragma synchronous;
Pragma synchronous = Full; (2)
Pragma synchronous = normal; (1)
Pragma synchronous = off; (0)
Query or change the settings of the "synchronous" tag

13.
Pragma temp_store;
Pragma temp_store = default; (0)
Pragma temp_store = file; (1)
Pragma temp_store = memory; (2)
Query or change the settings of the "temp_store" parameter
14.
Pragma temp_store_directory = 'Directory-name ';
Query or change the "temp_store_directory" settings -- directory where the files storing temporary tables and indexes are located.
Valid only for the current connection. Reset to the default value when creating a new connection.

15. Pragma database_list;
Call a call-back function for each opened database using the database information.
16. Pragma foreign_key_list (Table-name );
17. Pragma index_info (index-name );
18. Pragma index_list (Table-name );
19. Pragma table_info (Table-name );

20. Pragma [database.] schema_version;
Pragma [database.] schema_version = integer;
Pragma [database.] user_version;
Pragma [database.] user_version = integer;

View version information

21 Pragma integrity_check;
This command checks the integrity of the entire database
22
Pragma parser_trace = on; (1)
Pragma parser_trace = off; (0)
Enable or disable SQL syntax analysis tracing in the SQLite library for debugging. This pragma is available only when SQLite does not use the ndebug macro for compilation.

22
Pragma vdbe_trace = on; (1)
Pragma vdbe_trace = off; (0)
Enable or disable tracking of the virtual database engine in the SQLite Database

23
Pragma vdbe_listing = on; (1)
Pragma vdbe_listing = off; (0)
Enable or disable the virtual machine program list. When the list function is enabled, the content of the entire program is printed before execution,
It is like automatically executing the explain statement before each statement. The statement runs normally after the list is printed.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.