Documentation Source Text

Check-in [79f3efbc86]
Login

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

Overview
Comment:Fix typos. Clarification to the CoC in response to criticism.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 79f3efbc86ea690c4afd605386748b54d53476b9335c2e56dc508f119dd4cbb2
User & Date: drh 2018-03-23 11:47:35
Context
2018-03-23
14:30
Add TRUE and FALSE to the syntax diagrams as new literal values. check-in: 1d1c0fc6ec user: drh tags: trunk
11:47
Fix typos. Clarification to the CoC in response to criticism. check-in: 79f3efbc86 user: drh tags: trunk
2018-03-22
18:55
Further enhancement to the optimizer overview document, giving the change log for 3.23.0 something to link to. check-in: 219fa13637 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to pages/changes.in.

    38     38        message preference over internally-generated messages.
    39     39   <li> Added the -A command-line option to the [CLI] to make it easier to manage
    40     40        [SQLite Archive files].
    41     41   <li> Query optimizer enhancements:
    42     42   <ol type='a'>
    43     43     <li> Improve the [omit-left-join optimization] so that it works in cases where
    44     44          the right-hand table is UNIQUE but not necessarily NOT NULL.
    45         -  <li> Improve the [push-down optimization] so that works for many LEFT JOINs.
           45  +  <li> Improve the [push-down optimization] so that it works for many LEFT JOINs.
    46     46     <li> Add the [LEFT JOIN strength reduction optimization] that converts a LEFT
    47     47          JOIN into an ordinary JOIN if there exist terms in the WHERE clause
    48     48          that would prevent the extra all-NULL row of the LEFT JOIN from
    49     49          appearing in the output set.
    50     50     <li> Avoid unnecessary writes to the sqlite_sequence table when an
    51     51          [AUTOINCREMENT] table is updated with an rowid that is less than the
    52     52          maximum.

Changes to pages/codeofconduct.in.

     1      1   <title>Code Of Conduct</title>
     2      2   
     3      3   <fancy_format>
     4      4   
     5      5   <h1>Overview</h1>
     6      6   
     7         -<p>The code of conduct for developers of the SQLite 
     8         -project is the 72 "instruments of good works" from the 6th century
            7  +<p>Having been encouraged by commercial clients to adopt a written
            8  +code of conduct, the SQLite developers have elected to govern their
            9  +interactions with each other and with the larger SQLite user community in
           10  +accordance with the 72 "instruments of good works" from the 6th century
     9     11   [https://en.wikipedia.org/wiki/Rule_of_Saint_Benedict|Rule of St. Benedict],
    10     12   shown below.
    11     13   This code of conduct has proven its mettle in use by many thousands of
    12         -communities for 1,500 years, and has served as a baseline for many civil
    13         -law codes since the time of Charlemagne.
           14  +communities for over 1,500 years, and has served as a baseline for many
           15  +civil law codes since the time of Charlemagne.
    14     16   
    15     17   <p>
    16     18   The SQLite developers are not monks.
    17     19   None are able to adhere perfectly to this code of conduct.
    18     20   All will fall short.  The goal of this code of conduct is
    19     21   not to describe the minimum acceptable behavior below which
    20     22   none transgress,
    21     23   but rather to describe the highest standard of behavior
    22     24   to which all aspire.
    23     25   We grant grace to one another and request forgiveness and
    24     26   promise to amend our ways when we stumble.
    25     27   
    26     28   <p>
    27         -This code of conduct applies to the SQLite developers only.
           29  +This code of conduct is freely accepted by all current SQLite developers.
           30  +But the rule is not transitive.
    28     31   Everyone is free to use the SQLite source code, object code,
    29         -and/or documentation without having to agree
           32  +and/or documentation and/or submit patches and improvement
           33  +suggestions to the same without having to agree
    30     34   with the behavioral standards outlined below.
    31     35   You are encouraged to follow these standards as
    32     36   in doing so you will live a happier, healthier, and more
    33         -productive life.
           37  +productive lives.
    34     38   Nevertheless, this is a choice that you must make for yourself,
    35     39   and is not a precondition for using SQLite.
           40  +
    36     41   
    37     42   <h1>The Code</h1>
    38     43   
    39     44   <ol>
    40     45   <li> First of all, love the Lord God with your whole heart,
    41     46        your whole soul, and your whole strength.
    42     47   <li> Then, love your neighbor as yourself.
    43     48   <li> Do not murder.
    44     49   <li> Do not commit adultery.
    45     50   <li> Do not steal.
    46     51   <li> Do not covet.
    47     52   <li> Do not bear false witness.
    48         -<li> Honor all (1 Peter 2:17).
           53  +<li> Honor all.
    49     54   <li> Do not do to another what you would not have done to yourself.
    50     55   <li> Deny oneself in order to follow Christ.
    51     56   <li> Chastise the body.
    52     57   <li> Do not become attached to pleasures.
    53     58   <li> Love fasting.
    54     59   <li> Relieve the poor.
    55     60   <li> Clothe the naked.

Changes to pages/optoverview.in.

     1      1   <title>The SQLite Query Optimizer Overview</title>
     2      2   <tcl>hd_keywords {optimizer} {query planner} {SQLite query planner}</tcl>
     3      3   
     4      4   <table_of_contents>
     5      5   
     6      6   <h1>Introduction</h1>
     7      7   <p>
     8         -  This document provides overview of how the query planner and optimizer
            8  +  This document provides an overview of how the query planner and optimizer
     9      9     for SQLite works.
    10     10   
    11     11   
    12     12   <p>
    13     13     Given a single SQL statement, there might be dozens, hundreds, or even
    14     14     thousands of ways to implement that statement, depending on the complexity
    15     15     of the statement itself and of the underlying database schema.  The 
................................................................................
  1321   1321   </codeblock>
  1322   1322   
  1323   1323   <p>
  1324   1324     The view v1 cannot be [flattened] because it is DISTINCT.  It must
  1325   1325     instead be run as a subquery with the results being stored in a
  1326   1326     transient table, then the join is performed between t2 and the
  1327   1327     transient table.  The push-down optimization pushes down the
  1328         -  "b BETWEEN 10 AND 20" term into the view in order to make the transient
  1329         -  table smaller, or (if there were an index on t1.b) help the subquery
  1330         -  to run faster.  The resulting evaluation is like this:
         1328  +  "b BETWEEN 10 AND 20" term into the view.  This makes the transient
         1329  +  table smaller, and helps the subquery to run faster if there
         1330  +  is an index on t1.b.  The resulting evaluation is like this:
  1331   1331   
  1332   1332   <codeblock>
  1333   1333     SELECT x, y, b
  1334   1334       FROM t2
  1335   1335       JOIN (SELECT DISTINCT a, b FROM t1 WHERE b BETWEEN 10 AND 20)
  1336   1336      WHERE b BETWEEN 10 AND 10;
  1337   1337   </codeblock>
................................................................................
  1377   1377         ) recent
  1378   1378         ON u.source_seed_id = recent.xyz OR u.url_id = recent.xyz
  1379   1379      WHERE
  1380   1380          DATETIME(recent.rtime) > DATETIME('now', '-5 days');
  1381   1381   </codeblock>
  1382   1382   
  1383   1383   <p>
  1384         -  It is possible that future enhancements to prover might enable it
         1384  +  It is possible that future enhancements to the prover might enable it
  1385   1385     to recognize that NULL inputs to certain built-in functions
  1386   1386     always result in a NULL answer.  But not all built-in
  1387   1387     functions have that property (for example [coalesce()]) and, of
  1388   1388     course, the prover will never be able to reason about
  1389   1389     [application-defined SQL functions].
  1390   1390   
  1391   1391   
................................................................................
  1397   1397     changing the result.  This can happen if all of the following are
  1398   1398     true:
  1399   1399   
  1400   1400   <p>
  1401   1401     <ol>
  1402   1402     <li> The query is not an aggregate
  1403   1403     <li> Either the query is DISTINCT or else the ON or USING clause
  1404         -       on the LEFT JOIN must constraint the join such that it matches
         1404  +       on the LEFT JOIN must constrains the join such that it matches
  1405   1405          only a single row
  1406   1406     <li> The right-hand table of the LEFT JOIN must not be used anywhere
  1407   1407          in the query outside of its own USING or ON clause.
  1408   1408     </ol>
  1409   1409   
  1410   1410   <p>
  1411   1411     LEFT JOIN elimination often comes up when LEFT JOINs are used