Documentation Source Text

Check-in [65c5ce0f21]
Login

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

Overview
Comment:Update the PRAGMA cache_spill documentation to show the new functionality.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 65c5ce0f2100fae1d131a9d492ce5890c285298b
User & Date: drh 2015-11-13 18:14:11.360
Context
2015-11-25
18:42
Update the documentation for the LIKE/GLOB/REGEXP enhancement to virtual tables. (check-in: 6b8138c898 user: drh tags: trunk)
2015-11-13
18:14
Update the PRAGMA cache_spill documentation to show the new functionality. (check-in: 65c5ce0f21 user: drh tags: trunk)
18:04
Begin adding changes to the change log for version 3.10.0. (check-in: 5591c0216e user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to pages/pragma.in.
233
234
235
236
237
238
239
240

241
242
243
244
245
246
247
248
249
250










251
252
253
254
255
256
257
    <p>Each database connection can only have a single
    [sqlite3_busy_handler|busy handler].  This PRAGMA sets the busy handler
    for the process, possibly overwriting any previously set busy handler.
}

Pragma cache_spill {
    <p>^(<b>PRAGMA cache_spill;
         <br>PRAGMA cache_spill=</b><i>boolean</i><b>;</b>)^</p>


    <p>^(The cache_spill pragma enables or disables the ability of the pager
    to spill dirty cache pages to the database file in the middle of a 
    transaction.)^  ^(Cache_spill is enabled by default)^ and most applications
    should leave it that way as cache spilling is usually advantageous.
    However, a cache spill has the side-effect of acquiring an
    [EXCLUSIVE lock] on the database file.  Hence, some applications that
    have large long-running transactions may want to disable cache spilling
    in order to prevent the application from acquiring an exclusive lock
    on the database until the moment that the transaction [COMMIT]s.










}

Pragma cache_size {
    <p>^(<b>PRAGMA DB.cache_size;
       <br>PRAGMA DB.cache_size = </b><i>pages</i><b>;
       <br>PRAGMA DB.cache_size = -</b><i>kibibytes</i><b>;</b></p>
    <p>Query or change the suggested maximum number of database disk pages







|
>










>
>
>
>
>
>
>
>
>
>







233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
    <p>Each database connection can only have a single
    [sqlite3_busy_handler|busy handler].  This PRAGMA sets the busy handler
    for the process, possibly overwriting any previously set busy handler.
}

Pragma cache_spill {
    <p>^(<b>PRAGMA cache_spill;
         <br>PRAGMA cache_spill=</b><i>boolean</i><b>;
         <br>PRAGMA DB.cache_spill=<i>N</i>;</b>)^</p>

    <p>^(The cache_spill pragma enables or disables the ability of the pager
    to spill dirty cache pages to the database file in the middle of a 
    transaction.)^  ^(Cache_spill is enabled by default)^ and most applications
    should leave it that way as cache spilling is usually advantageous.
    However, a cache spill has the side-effect of acquiring an
    [EXCLUSIVE lock] on the database file.  Hence, some applications that
    have large long-running transactions may want to disable cache spilling
    in order to prevent the application from acquiring an exclusive lock
    on the database until the moment that the transaction [COMMIT]s.
    <p>^(The "PRAGMA cache_spill=<i>N</i>" form of this pragma sets a minimum
    cache size threshold required for spilling to occur.  The number of pages
    in cache must exceed both the cache_spill threshold and the maximum cache
    size set by the [PRAGMA cache_size] statement in order for spilling to
    occur.  
    <p>^(The "PRAGMA cache_spill=<i>boolean</i>" form of this pragma applies
    across all databases attached to the database connection.  But the
    "PRAGMA cache_spill=<i>N</i>" form of this statement only applies to
    the "main" schema or whatever other schema is specified as part of the
    statement.
}

Pragma cache_size {
    <p>^(<b>PRAGMA DB.cache_size;
       <br>PRAGMA DB.cache_size = </b><i>pages</i><b>;
       <br>PRAGMA DB.cache_size = -</b><i>kibibytes</i><b>;</b></p>
    <p>Query or change the suggested maximum number of database disk pages