PRAGMA page_size
Query or set the page size of the database.
PRAGMA schema.page_size; PRAGMA schema.page_size = bytes;
On the sample database
What PRAGMA page_size returns on the sample database, in SQLite 3.54.1 as built for the browser by sql.js:
| page_size |
|---|
| 1024 |
What the SQLite documentation says
Query or set the page size of the database. The page size must be a power of two between 512 and 65536 inclusive.
When a new database is created, SQLite assigns a page size to the database based on platform and filesystem. For many years, the default page size was almost always 1024 bytes, but beginning with SQLite version 3.12.0 (2016-03-29), the default page size increased to 4096. The default page size is recommended for most applications.
Specifying a new page size does not change the page size immediately. Instead, the new page size is remembered and is used to set the page size when the database is first created, if it does not already exist when the page_size pragma is issued, or at the next VACUUM command that is run on the same database connection while not in WAL mode.
The SQLITE_DEFAULT_PAGE_SIZE compile-time option can be used to change the default page size assigned to new databases.
From sqlite.org's pragma documentation for SQLite 3.54.1, in the public domain.
← page_count · parser_trace →