aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* Enhance the EXISTS-to-JOIN optimization so that it works on EXISTS subqueriesdrh13 days
| | | | | | that do not have a WHERE clause, and so that it works on nested EXISTS subqueries. FossilOrigin-Name: c1d5295724f9cf7f49e0786d28016eff2d268a2b670f934d24c76787626089db
* Merge fixes from trunk into the empty-table-optimizations branchdrh2025-07-04
|\ | | | | FossilOrigin-Name: 6f98b16d210a9f5b6ca4b4599e3dab3263eddbae7c70ddbcabf988f4a1014e8b
| * Fix harmless compiler warnings.drh2025-07-04
| | | | | | FossilOrigin-Name: 13af4acebe09b047756c22b800136cffaba532e7fcaa448a4edf4fedb94e9bbc
| * Remove an ALWAYS() added by [960a8e6fc91f4] that turns out to be falsedrh2025-07-04
| | | | | | | | | | in some cases of malformed SQL. FossilOrigin-Name: cc8171461bf35f584888a24b844c8b79ad30155b19b61161e9f3abc276e8aae5
* | Do not allow the EXISTS-to-JOIN optimization if the EXISTS clause is baseddrh2025-07-04
| | | | | | | | | | on a view, since that view might expand into a join. FossilOrigin-Name: 872c41feddafcc21a02f1229ce017ceea9f8e309a4dd5b6e323477d67f975947
* | Improve the early-termination optimization so that it works in queriesdrh2025-07-04
| | | | | | | | | | which use the LIKE optimization in the outer loop. FossilOrigin-Name: b4e4d148243cfcb09aa0aaca30e83812b42e2780073e55c0e8c6e3da16243dfc
* | Merge the latest trunk fixes and enhancements into the ↵drh2025-07-03
|\| | | | | | | | | empty-table-optimizations branch FossilOrigin-Name: d4f47e04f5880e99a53089e2dd5cde64a7ea44f059d9906b5d11324896546714
| * Make the value of an explicit LIMIT clause on a scalar sub-query available ↵dan2025-07-03
| | | | | | | | | | to xBestIndex for simple "LIMIT 0" and "LIMIT 1" queries. FossilOrigin-Name: 33b6a63caafccc61b3193714911cd8b5dd9b7f1798054b8c7845b23688d531f2
| * Make handling of LIMIT clauses in correlated sub-queries on virtual tables ↵dan2025-07-03
| | | | | | | | | | more efficient. FossilOrigin-Name: 7214cb2a5b35190a06a1040cd4c54f325d347f8d8e36a07fd76c0a421e266522
| * Fix an uninitialized variable added yesterday by [d27d34fb746280e7].drh2025-07-03
| | | | | | | | | | | | This problem was discovered overnight by [https://github.com/google/oss-fuzz|OSSFuzz]. FossilOrigin-Name: 6db4703f1178fc808f3a75c355fb6638fb12c88f6e1ce7f579e200ced8089114
* | Minor tweaks to the exists-to-join optimization.drh2025-07-03
| | | | | | FossilOrigin-Name: 9cb600ad576c68647ed943a0773019312c5f01c9c1ca9ff0bf1214b03a531b48
* | Merge in the exists-to-join optimization that has been modifieddrh2025-07-02
|\ \ | | | | | | | | | | | | to relax the requirement of having an indexed join constraint. FossilOrigin-Name: 1c1aef2b7feae29066d0330699ab634ef41f5b60cdcd479a60cb1a5409553138
| * \ Merge all the latest trunk enhancements into the exists-to-join branch.drh2024-07-31
| |\ \ | | | | | | | | FossilOrigin-Name: 9084a4c8726a2c7ba1c381886e29c7b86121d531282be0d63d5988d84f6f448d
| * \ \ Merge the latest trunk enhancements into the exists-to-join branch.drh2024-06-27
| |\ \ \ | | | | | | | | | | FossilOrigin-Name: fc643f8a12e9b7448136b281f798e18dfebe0a3df5115d930b965c8a33933e2d
| * | | | Do not attempt the exists-to-join optimization if the FROM clause is full.drh2024-06-20
| | | | | | | | | | | | | | | FossilOrigin-Name: 8e3a1d2850337a902ab36b1d6a0dad4ae35030b71d1e15547f6e7487c1f86d18
| * | | | Do not attempt the exists-to-join optimization for expressions from the ON ↵dan2024-06-12
| | | | | | | | | | | | | | | | | | | | | | | | | clause of joins. FossilOrigin-Name: 4666433cbd9af21c2e0440b10bcb39878624a39485e2bb514553b276acb8a401
| * | | | Provide the ability to disable the exists-to-join optimization usingdrh2024-06-11
| | | | | | | | | | | | | | | | | | | | | | | | | SQLITE_TESTCTRL_OPTIMIZATIONS. Provide tree-trace output for the optimization. FossilOrigin-Name: 33a3f327855b427ae6ba0057218d043a1417bc9d780728f47f23acdd836e1686
| * | | | Merge trunk enhancements into the exists-to-join branch.drh2024-06-11
| |\ \ \ \ | | | | | | | | | | | | FossilOrigin-Name: 5f25a9518a675efbd0525cc2f5595ee7bc7122be7cfecdf6b20c909185dea370
| * | | | | Add missing calls to sqlite3exprSkipCollateAndLikely() to the enchancement ↵dan2024-06-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | on this branch. FossilOrigin-Name: 078537d057d638389e3ab3bc04bcac53f342c7bf1d8d75222296ef42d09e9ee7
| * | | | | Fix a crash that could occur when the SELECT in an EXISTS(SELECT ...) used ↵dan2024-06-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | an unknown collation sequence. FossilOrigin-Name: f3009a6d7facd1ead520d588c5ad089db76d8641cd3dae076f2405492d7defcd
| * | | | | Add extra tests for the changes on this branch.dan2024-06-08
| | | | | | | | | | | | | | | | | | FossilOrigin-Name: a6365c778f2a6d6fa78e8520553373898f382ce73bf6496533e26291648ef5d1
| * | | | | Experimental optimization to rewrite a SELECT with an EXISTS(...) expression ↵dan2024-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in the WHERE clause as a join. FossilOrigin-Name: 972a33db0b0e924b78d5309d222d8ea298bd59c72da14ea2d14e8e2caaad1e0a
* | | | | | Fix VDBE coveragedrh2025-07-02
| | | | | | | | | | | | | | | | | | FossilOrigin-Name: ff593a16d61cc5c588d1737deb822abb90b1759475a4cabfcf608978b1191487
* | | | | | Early exit if one of the inner loops of a 3-way or larger join is andrh2025-07-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | empty table. FossilOrigin-Name: eaad6ac707a5960d9518d4049b7b1759e7512727ce87be3c402408144bda0a97
* | | | | | If the LHS for an EXCEPT or INTERSECT operator is empty, skip over thedrh2025-07-02
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | computation of the RHS. FossilOrigin-Name: 13f096ae8a850a05d4a8684561066f11693ee66289e6568c44ef32822cca06f6
* | | | | Improve the bytecode for joins such that it exits earlier if it determinesdrh2025-07-02
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | that no output is possible. FossilOrigin-Name: 2d2b61cba44a756a3a41ef5c95bbb0c0b7111f4b679c578fec9bd0b214cca367
| * \ \ \ \ Merge trunk fixes into the empty-table-optimizations branch.drh2025-07-01
| |\ \ \ \ \ | | | | | | | | | | | | | | FossilOrigin-Name: 63306e447efb3ac17e789a331ed3bb65459eb8b79d66e9c185ba3bd852f34ce3
| * | | | | | More aggressive optimization of addrHalt for RIGHT JOIN.drh2025-06-30
| | | | | | | | | | | | | | | | | | | | | FossilOrigin-Name: 5e51d1c0dfcafef9e71c99de3f626dee157c935724b84c6e0c630299a880446f
| * | | | | | Compute WhereLevel.addrBrk and .addrHalt early so that those labels can bedrh2025-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | used to abort loops early. Use this to improve performance on two more of the cases described by [forum:/forumpost/52651713ac|forum post 52651713ac]. FossilOrigin-Name: 6fc0b9ac23be6840542982de4bb282ebca1db8b5ab3baefdde95a997c1506e81
* | | | | | | Ensure that Expr.op2 values for TK_AGG_FUNCTION nodes are adjusted whendrh2025-07-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | query flattening. FossilOrigin-Name: d27d34fb746280e7e81335db4e195914b15403ef0da7b2955550553dd78fbe9a
* | | | | | | Improved comments on bytecode used to implement aggregate queries, to aiddrh2025-07-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in debugging. FossilOrigin-Name: a1a8b85cdba64a17dcdcd4e6b42b872957cec2dc05b0ac34dfcd82f59344034b
* | | | | | | Improved byte-code comments for the short-circuit optimization ofdrh2025-07-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [0083d5169a46104a], to aid in debugging. FossilOrigin-Name: 113f9d10e347eeaa893ff8b47a461009e0b12589374b93cf3e0bddd19c702dea
* | | | | | | Cache and reuse virtual table cursors in the bytecode engine.drh2025-07-01
| |/ / / / / |/| | | | | | | | | | | FossilOrigin-Name: 2d187d4232d750cb1840f1d89c8aed65962cb0883c1d7f91c554b451e475c514
* | | | | | When attempting to optimize "expr AND false" to "false" anddrh2025-07-01
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "expr IN ()" to "false", take care not to delete aggregate functions in the "expr" as doing so can change the meaning of the query. See [forum:/forumpost/f4878de3e7dd4764|forum thread f4878de3e7]. FossilOrigin-Name: 77397bd67d918db57d5ac545d6d963194806fdabcdaa8f822b6b09e4cfe8b715
* | | | | Strive to skip the evaluation of scalar subqueries that are part of adrh2025-06-30
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | larger expression if the result from the scalar subquery does not change the result of the overall expression. FossilOrigin-Name: 0083d5169a46104a25355bdd9d5a2f4027b049191ebda571dd228477ec217296
| * | | | | For all binary operators, try to avoid computing subquery operands if thedrh2025-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | other operand is NULL. FossilOrigin-Name: d86eb16283c4b573c506d4faa422d5d9aeb6abc279d8e6a8e2104737162d417f
| * | | | | Slightly smaller and faster version of the previous check-in.drh2025-06-30
| | | | | | | | | | | | | | | | | | FossilOrigin-Name: f6e6fd02f4ad49c390a2d3c9626d57f9b2fff1f67eb361b30074cc1f5121810e
| * | | | | Factor out the code that tries to avoid evaluating subquery operands if thedrh2025-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | other operand is NULL into a subroutine, so that it can be more easily reused by other parts of the code generator. FossilOrigin-Name: 3c6c71bcea16443b82234414137dfa1b59e2ee8fe5097906c738fc1228fec4e6
| * | | | | Improve the bytecode generated for comparisons so that if one operand isdrh2025-06-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a subquery and the other operand evaluates to NULL, the subquery operand is not even computed. This fixes 5 of the 12 slow queries described in [forum:/forumpost/52651713ac|forum post 52651713ac]. FossilOrigin-Name: f147bc04776ac0056412f69dfc518016c0d5b4e9d964664e3d88f595fb29dbe0
* | | | | | Minor API doc typo fixes from brickviking.stephan2025-06-30
| | | | | | | | | | | | | | | | | | FossilOrigin-Name: b48d95191662e09659b5b55ae65cd462c9e1700c4f92dd9d40b59548f0797c02
* | | | | | Minor API doc typo fixes from brickviking.stephan2025-06-29
|/ / / / / | | | | | | | | | | FossilOrigin-Name: c7cf9dcb69ce558ba6b81b2787f92ed7383e37f08b199faeb14f7adb4e494532
* | | | | Raise an error right away if the number of aggregate terms in a querydrh2025-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | exceeds the maximum number of columns. FossilOrigin-Name: 5508b56fd24016c13981ec280ecdd833007c9d8dd595edb295b984c2b487b5c8
* | | | | API doc typo fixes and closing DD element tags from brickviking.stephan2025-06-27
| | | | | | | | | | | | | | | FossilOrigin-Name: c9ddd15b0197e6e5c5a74581d94cf986523514ffdb28c66ba18de9a22aec97e9
* | | | | Work around an apparent GCC UBSAN bug. Seedrh2025-06-26
| | | | | | | | | | | | | | | | | | | | | | | | | [forum:/forumpost/1d7c25d4a2d6f5e2|forum thread 1d7c25d4a2d] for details. FossilOrigin-Name: 23056532e51abcff486e38a3319545e6663b4a855abe1bc443e2cd7e0473748c
* | | | | Minor API doc fixes sent off-list from brickviking.stephan2025-06-25
| | | | | | | | | | | | | | | FossilOrigin-Name: cb4d05633a0c9cdf146f3108e1b4b10754cd79d72a425d8cc9cd21836037a01b
* | | | | Similar fix to the previous check-in, but this time fordrh2025-06-24
| | | | | | | | | | | | | | | | | | | | | | | | | sqlite3_preupdate_new(). FossilOrigin-Name: 9aaff764d508cbd9823f23cdf0c510255721bc5c09be481ebc60bd8902ceb8c5
* | | | | Range check the column index on the sqlite3_preupdate_old() interfacedrh2025-06-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and return SQLITE_MISUSE if too large. [forum:/forumpost/b617e497287235d0|Forum post b617e49728]. FossilOrigin-Name: 6a5701e6c7be25cba93e55438f950966e1dacb32eb2b23a8acc8ac53da6f0a85
* | | | | API doc typo fixes and one rephrasing improvement from brickviking.stephan2025-06-24
| | | | | | | | | | | | | | | FossilOrigin-Name: 85e8060c4701a601d4bc8a639acd268ee4f2736193820d55ecd9b8abf864132f
* | | | | Fix an SQL typo introduced by the previous check-in.drh2025-06-23
| | | | | | | | | | | | | | | FossilOrigin-Name: 72a81d247bc74a21d077d311969ac585d0f26bffbd210ec60f03c38bf138790e
* | | | | Escape the "_" character in LIKE patterns in the CLI.drh2025-06-23
| | | | | | | | | | | | | | | | | | | | | | | | | [forum:/forumpost/6a89702f5d|Forum post 6a89702f5d]. FossilOrigin-Name: cf61cd359e666c66b6bba4407a653c799f7f07e1f5ee6b837ad467029c461a6a