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.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 65c5ce0f2100fae1d131a9d492ce5890c285298b
User & Date: drh 2015-11-13 18:14:11
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
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to pages/pragma.in.

   233    233       <p>Each database connection can only have a single
   234    234       [sqlite3_busy_handler|busy handler].  This PRAGMA sets the busy handler
   235    235       for the process, possibly overwriting any previously set busy handler.
   236    236   }
   237    237   
   238    238   Pragma cache_spill {
   239    239       <p>^(<b>PRAGMA cache_spill;
   240         -         <br>PRAGMA cache_spill=</b><i>boolean</i><b>;</b>)^</p>
          240  +         <br>PRAGMA cache_spill=</b><i>boolean</i><b>;
          241  +         <br>PRAGMA DB.cache_spill=<i>N</i>;</b>)^</p>
   241    242   
   242    243       <p>^(The cache_spill pragma enables or disables the ability of the pager
   243    244       to spill dirty cache pages to the database file in the middle of a 
   244    245       transaction.)^  ^(Cache_spill is enabled by default)^ and most applications
   245    246       should leave it that way as cache spilling is usually advantageous.
   246    247       However, a cache spill has the side-effect of acquiring an
   247    248       [EXCLUSIVE lock] on the database file.  Hence, some applications that
   248    249       have large long-running transactions may want to disable cache spilling
   249    250       in order to prevent the application from acquiring an exclusive lock
   250    251       on the database until the moment that the transaction [COMMIT]s.
          252  +    <p>^(The "PRAGMA cache_spill=<i>N</i>" form of this pragma sets a minimum
          253  +    cache size threshold required for spilling to occur.  The number of pages
          254  +    in cache must exceed both the cache_spill threshold and the maximum cache
          255  +    size set by the [PRAGMA cache_size] statement in order for spilling to
          256  +    occur.  
          257  +    <p>^(The "PRAGMA cache_spill=<i>boolean</i>" form of this pragma applies
          258  +    across all databases attached to the database connection.  But the
          259  +    "PRAGMA cache_spill=<i>N</i>" form of this statement only applies to
          260  +    the "main" schema or whatever other schema is specified as part of the
          261  +    statement.
   251    262   }
   252    263   
   253    264   Pragma cache_size {
   254    265       <p>^(<b>PRAGMA DB.cache_size;
   255    266          <br>PRAGMA DB.cache_size = </b><i>pages</i><b>;
   256    267          <br>PRAGMA DB.cache_size = -</b><i>kibibytes</i><b>;</b></p>
   257    268       <p>Query or change the suggested maximum number of database disk pages