/ Check-in [92848623]
Login

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

Overview
Comment:More details in the header comment of pushDownWhereTerms(). No changes to code.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | prefer-coroutine-sort-subquery
Files: files | file ages | folders
SHA3-256: 928486231ff7cc0df17a5aa23a080a1b8720e168db5227a7dbd34861283ba689
User & Date: drh 2017-09-30 11:47:06
Context
2017-10-02
02:52
The query planner now always prefers to implement a FROM-clause subquery using a co-routine rather than flattening the subquery into the outer query. check-in: c9104b59 user: drh tags: trunk
2017-09-30
11:47
More details in the header comment of pushDownWhereTerms(). No changes to code. Closed-Leaf check-in: 92848623 user: drh tags: prefer-coroutine-sort-subquery
10:50
Make sure the SQLITE_Stat34 optimization switch is always 0x800, a value which is hard-coded in the TH3 test suite. check-in: 6aed4ea3 user: drh tags: prefer-coroutine-sort-subquery
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/select.c.

3827
3828
3829
3830
3831
3832
3833
3834




3835
3836
3837
3838
3839
3840
3841
** The hope is that the terms added to the inner query will make it more
** efficient.
**
** Do not attempt this optimization if:
**
**   (1) (** This restriction was removed on 2017-09-29.  We used to
**           disallow this optimization for aggregate subqueries, but now
**           it is allowed by putting the extra terms on the HAVING clause **)




**
**   (2) The inner query is the recursive part of a common table expression.
**
**   (3) The inner query has a LIMIT clause (since the changes to the WHERE
**       close would change the meaning of the LIMIT).
**
**   (4) The inner query is the right operand of a LEFT JOIN.  (The caller







|
>
>
>
>







3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
** The hope is that the terms added to the inner query will make it more
** efficient.
**
** Do not attempt this optimization if:
**
**   (1) (** This restriction was removed on 2017-09-29.  We used to
**           disallow this optimization for aggregate subqueries, but now
**           it is allowed by putting the extra terms on the HAVING clause.
**           The added HAVING clause is pointless if the subquery lacks
**           a GROUP BY clause.  But such a HAVING clause is also harmless
**           so there does not appear to be any reason to add extra logic
**           to suppress it. **)
**
**   (2) The inner query is the recursive part of a common table expression.
**
**   (3) The inner query has a LIMIT clause (since the changes to the WHERE
**       close would change the meaning of the LIMIT).
**
**   (4) The inner query is the right operand of a LEFT JOIN.  (The caller