Documentation Source Text

Check-in [6d2df6128e]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Attempt to clarify the operation of the page_size pragma.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 6d2df6128e0464b777992a038f7aa5d41a2a9b9c79d8c7608568869926a2bc1d
User & Date: drh 2017-04-12 20:02:49.530
Context
2017-04-13
09:59
Update fts5 docs to reflect support for a user column on the LHS of a MATCH operator. (check-in: ab263df2e6 user: dan tags: trunk)
2017-04-12
20:02
Attempt to clarify the operation of the page_size pragma. (check-in: 6d2df6128e user: drh tags: trunk)
20:00
Update fts5 documentation to reflect new column filter capability. (check-in: 27ba2d2d59 user: dan tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to pages/pragma.in.
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
Pragma page_size {
   <p>^(<b>PRAGMA DB.page_size;
       <br>PRAGMA DB.page_size = </b><i>bytes</i><b>;</b></p>
    <p>Query or set the page size of the database.)^ ^The page
    size must be a power of two between 512 and 65536 inclusive.
    </p>

    <p>^When a new database is created, SQLite assigned 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] ([dateof:3.12.0]), 
    the default page size increased
    to 4096.

    <p>^The page_size pragma will only set in the
    page size if it is issued before any other SQL statements that
    cause I/O against the database file.
    SQL statements that cause I/O against the database file include
    "CREATE", "SELECT", "BEGIN IMMEDIATE", and "PRAGMA journal_mode=WAL".
    ^(If the page_size pragma is
    used to specify a new page size just prior to
    running the [VACUUM] command and if the database is not in
    [WAL | WAL journal mode] then [VACUUM] will change the page
    size to the new value.)^</p>

    <p>^The [SQLITE_DEFAULT_PAGE_SIZE] compile-time option can be used
    to change the default page size assigned to new databases.
}

Pragma max_page_count {
    <p>^(<b>PRAGMA DB.max_page_count;







|



|
|

|
|
|
<
<
|
<
|
<
|







883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899


900

901

902
903
904
905
906
907
908
909
Pragma page_size {
   <p>^(<b>PRAGMA DB.page_size;
       <br>PRAGMA DB.page_size = </b><i>bytes</i><b>;</b></p>
    <p>Query or set the page size of the database.)^ ^The page
    size must be a power of two between 512 and 65536 inclusive.
    </p>

    <p>^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] ([dateof:3.12.0]), 
    the default page size increased to 4096.
    The default page size is recommended for most applications.

    <p>^(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].)^</p>

    <p>^The [SQLITE_DEFAULT_PAGE_SIZE] compile-time option can be used
    to change the default page size assigned to new databases.
}

Pragma max_page_count {
    <p>^(<b>PRAGMA DB.max_page_count;