Documentation Source Text

Check-in [180288b238]
Login

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

Overview
Comment:Begin adding changes for the 3.17.0 release.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 180288b238f50bf50cea3e2d19bfcf96d97b7173
User & Date: drh 2017-01-12 20:14:01
Context
2017-01-12
20:25
Proposed enhancement to the definition of column affinity so that it covers columns belonging to subqueries and VIEWs. check-in: 524ba450fb user: drh tags: trunk
20:14
Begin adding changes for the 3.17.0 release. check-in: 180288b238 user: drh tags: trunk
19:43
Update the speed and size spreadsheet with the latest measurements from trunk. check-in: 033eb12bb9 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pages/changes.in.

16
17
18
19
20
21
22























23
24
25
26
27
28
29
set nChng 0
proc chng {date desc {options {}}} {
  global nChng aChng xrefChng
  set aChng($nChng) [list $date $desc $options]
  set xrefChng($date) $nChng
  incr nChng
}
























chng {2017-01-06 (3.16.2)} {
<li>Fix the [REPLACE] statement for 
    [WITHOUT ROWID] tables that lack secondary indexes so that
    it works correctly with triggers and foreign keys.  This was a new bug
    caused by performance optimizations added in version 3.16.0.
    Ticket [https://www.sqlite.org/src/info/30027b613b4|30027b613b4]







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
set nChng 0
proc chng {date desc {options {}}} {
  global nChng aChng xrefChng
  set aChng($nChng) [list $date $desc $options]
  set xrefChng($date) $nChng
  incr nChng
}

chng {2017-03-00 (3.17.0)} {
<li>Add the [SQLITE_DEFAULT_LOOKASIDE] compile-time option.
<li>Increase the default [lookaside memory allocator|lookaside]
    size from 512,125 to 1200,100 
    as this provides better performance while only adding 56KB 
    of extra memory per connection.  Memory-sensitive 
    applications can restore the old
    default at compile-time, start-time, or run-time.
<li>Change [SQLITE_DEFAULT_PCACHE_INITSZ] from 100 to 20, for
    improved performance.
<li>Added the SQLITE_UINT64_TYPE compile-time option as an
    analog to SQLITE_INT64_TYPE.
<li>Perform some [UPDATE] operations in a single pass instead of
    in two passes.
<li>Other performance improvements.
<p><b>Bug Fixes:</b>
<li>Throw an error if the ON clause of a LEFT JOIN references tables
    to the right of the ON clause.  This is the same behavior as
    PostgreSQL.  Formerly, SQLite silently converted the LEFT JOIN
    into an INNER JOIN.  Fix for ticket
    [https://www.sqlite.org/src/info/25e335f802dd|25e335f802dd].
}

chng {2017-01-06 (3.16.2)} {
<li>Fix the [REPLACE] statement for 
    [WITHOUT ROWID] tables that lack secondary indexes so that
    it works correctly with triggers and foreign keys.  This was a new bug
    caused by performance optimizations added in version 3.16.0.
    Ticket [https://www.sqlite.org/src/info/30027b613b4|30027b613b4]

Changes to pages/chronology.in.

24
25
26
27
28
29
30

31
32
33
34
35
36
37
#    ORDER BY mtime DESC;
#
# A small amount of manual editing and de-duplication followed.
#
# Manually edit the list for each subsequent release.
#      
foreach line [split {

a65a62893c|2016-01-06|version 3.16.2
979f043928|2016-01-03|Version 3.16.1
04ac0b75b1|2017-01-02|Version 3.16.0
bbd85d235f|2016-11-28|Version 3.15.2
1136863c76|2016-11-04|Version 3.15.1
707875582f|2016-10-14|Version 3.15.0
29dbef4b85|2016-09-12|Version 3.14.2







>







24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#    ORDER BY mtime DESC;
#
# A small amount of manual editing and de-duplication followed.
#
# Manually edit the list for each subsequent release.
#      
foreach line [split {
xxxxxxxxxx|pending|version 3.17.0
a65a62893c|2016-01-06|version 3.16.2
979f043928|2016-01-03|Version 3.16.1
04ac0b75b1|2017-01-02|Version 3.16.0
bbd85d235f|2016-11-28|Version 3.15.2
1136863c76|2016-11-04|Version 3.15.1
707875582f|2016-10-14|Version 3.15.0
29dbef4b85|2016-09-12|Version 3.14.2

Changes to pages/compile.in.

298
299
300
301
302
303
304








305
306
307
308
309
310
311








312
313
314
315
316
317
318
  can be changed at run-time using the [journal_size_limit pragma].
}

COMPILE_OPTION {SQLITE_DEFAULT_LOCKING_MODE=<i>&lt;1 or 0&gt;</i>} {
  If set to 1, then the default [locking_mode] is set to EXCLUSIVE.
  If omitted or set to 0 then the default [locking_mode] is NORMAL.
}









COMPILE_OPTION {SQLITE_DEFAULT_MEMSTATUS=<i>&lt;1 or 0&gt;</i>} {
  This macro is used to determine whether or not the features enabled and
  disabled using the SQLITE_CONFIG_MEMSTATUS argument to [sqlite3_config()]
  are available by default. The default value is 1 ([SQLITE_CONFIG_MEMSTATUS]
  related features enabled).
}









COMPILE_OPTION {SQLITE_DEFAULT_PAGE_SIZE=<i>&lt;bytes&gt;</i>} {
  This macro is used to set the default page-size used when a
  database is created. The value assigned must be a power of 2. The
  default value is 4096. The compile-time default may be overridden at 
  runtime by the [PRAGMA page_size] command.
}







>
>
>
>
>
>
>
>







>
>
>
>
>
>
>
>







298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
  can be changed at run-time using the [journal_size_limit pragma].
}

COMPILE_OPTION {SQLITE_DEFAULT_LOCKING_MODE=<i>&lt;1 or 0&gt;</i>} {
  If set to 1, then the default [locking_mode] is set to EXCLUSIVE.
  If omitted or set to 0 then the default [locking_mode] is NORMAL.
}

COMPILE_OPTION {SQLITE_DEFAULT_LOOKASIDE=<i>SZ,N</i>} {
  Sets the default size of the [lookaside memory allocator] memory pool
  to N entries of SZ bytes each.  This setting can be modified at
  start-time using [sqlite3_config]([SQLITE_CONFIG_LOOKASIDE]) and/or
  as each [database connection] is opened using
  [sqlite3_db_config](db, [SQLITE_DBCONFIG_LOOKASIDE]).
}

COMPILE_OPTION {SQLITE_DEFAULT_MEMSTATUS=<i>&lt;1 or 0&gt;</i>} {
  This macro is used to determine whether or not the features enabled and
  disabled using the SQLITE_CONFIG_MEMSTATUS argument to [sqlite3_config()]
  are available by default. The default value is 1 ([SQLITE_CONFIG_MEMSTATUS]
  related features enabled).
}

COMPILE_OPTION {SQLITE_DEFAULT_PCACHE_INITSZ=<i>N</i>} {
  This macro determines the number of pages initially allocated by the 
  page cache module when [SQLITE_CONFIG_PAGECACHE] configuration option is
  not use and memory for the page cache is obtained from [sqlite3_malloc()]
  instead.  The number of pages set by this macro are allocated in a single
  allocation, which reduces the load on the memory allocator.
}

COMPILE_OPTION {SQLITE_DEFAULT_PAGE_SIZE=<i>&lt;bytes&gt;</i>} {
  This macro is used to set the default page-size used when a
  database is created. The value assigned must be a power of 2. The
  default value is 4096. The compile-time default may be overridden at 
  runtime by the [PRAGMA page_size] command.
}

Changes to pages/index.in.

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
[full-featured SQL|full-featured], [public-domain],
SQL database engine.
SQLite is the [most used] database engine in the world.
<a class="button" href="about.html">More Info</a></p>

<hr class="xhr">
<span class="hdrfont">Latest Release:&nbsp;&nbsp;</span>
<a href="releaselog/3_16_2.html">Version 3.16.2</a> ([dateof:3.16.2]).
<a class="button" href="download.html">Download</a>
<a class="button" href="chronology.html">Prior Releases</a>

<div class="mobileonly">
<hr class="xhr">
<h3>Common Links</h3>
<tcl>common_links</tcl>







|







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
[full-featured SQL|full-featured], [public-domain],
SQL database engine.
SQLite is the [most used] database engine in the world.
<a class="button" href="about.html">More Info</a></p>

<hr class="xhr">
<span class="hdrfont">Latest Release:&nbsp;&nbsp;</span>
<a href="releaselog/3_17_0.html">Version 3.17.0</a> ([dateof:3.17.0]).
<a class="button" href="download.html">Download</a>
<a class="button" href="chronology.html">Prior Releases</a>

<div class="mobileonly">
<hr class="xhr">
<h3>Common Links</h3>
<tcl>common_links</tcl>

Changes to pages/malloc.in.

562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
...
594
595
596
597
598
599
600
601
602




603
604
605
606
607
608
609
free() end up using a significant fraction of the CPU time assigned
to SQLite.</p>

<p>SQLite [version 3.6.1] ([dateof:3.6.1])
introduced the lookaside memory allocator to
help reduce the memory allocation load.  In the lookaside allocator,
each [database connection] preallocates a single large chunk of memory
(typically in the range of 50 to 100 kilobytes) and divides that chunk
up into small fixed-size "slots" of around 50 to 200 byte each.  This
becomes the lookaside memory pool.  Thereafter, memory allocations
associated with the [database connection] and that are not too larger
are satisfied using one of the lookaside pool slots rather than by calling
the general-purpose memory allocator.  Larger allocations continue to
use the general-purpose memory allocator, as do allocations that occur
when the lookaside pool slots are all checked out.  
But in many cases, the memory
................................................................................
allocations and deallocations are very fast.  In speed tests on
Linux and Mac OS X workstations, SQLite has shown overall performance
improvements as high as 10% and 15%, depending on the workload how
lookaside is configured.</p>

<p>The size of the lookaside memory pool has a global default value
but can also be configured on a connection-by-connection basis.
To change the default size of the lookaside memory pool use the 
following interface at start-time:</p>





<blockquote><pre>
[sqlite3_config]([SQLITE_CONFIG_LOOKASIDE], sz, cnt);
</pre></blockquote>

<p>The "sz" parameter is the size in bytes of each lookaside slot.
The default is 100 bytes.  The "cnt" parameter is







|
|







 







|
|
>
>
>
>







562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
...
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
free() end up using a significant fraction of the CPU time assigned
to SQLite.</p>

<p>SQLite [version 3.6.1] ([dateof:3.6.1])
introduced the lookaside memory allocator to
help reduce the memory allocation load.  In the lookaside allocator,
each [database connection] preallocates a single large chunk of memory
(typically in the range of 60 to 120 kilobytes) and divides that chunk
up into small fixed-size "slots" of around 100 to 1000 byte each.  This
becomes the lookaside memory pool.  Thereafter, memory allocations
associated with the [database connection] and that are not too larger
are satisfied using one of the lookaside pool slots rather than by calling
the general-purpose memory allocator.  Larger allocations continue to
use the general-purpose memory allocator, as do allocations that occur
when the lookaside pool slots are all checked out.  
But in many cases, the memory
................................................................................
allocations and deallocations are very fast.  In speed tests on
Linux and Mac OS X workstations, SQLite has shown overall performance
improvements as high as 10% and 15%, depending on the workload how
lookaside is configured.</p>

<p>The size of the lookaside memory pool has a global default value
but can also be configured on a connection-by-connection basis.
To change the default size of the lookaside memory pool at
compile-time, use the 
[SQLITE_DEFAULT_LOOKASIDE|-DSQLITE_DEFAULT_LOOKASIDE=<i>SZ,N</i>]
option.
To change the default size of the lookaside memory pool at
start-time, use the [sqlite3_config()] interface:</p>

<blockquote><pre>
[sqlite3_config]([SQLITE_CONFIG_LOOKASIDE], sz, cnt);
</pre></blockquote>

<p>The "sz" parameter is the size in bytes of each lookaside slot.
The default is 100 bytes.  The "cnt" parameter is