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