Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | New optimizations to detect early when queries return no rows due to tables being empty. This includes the EXISTS-to-JOIN optimization that tries to transform EXISTS constraints into additional terms of the FROM clause. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
e33da6d5dc964db817d1bc63c9083aec |
| User & Date: | drh 2025-07-08 19:53:36.480 |
References
|
2026-01-22
| ||
| 19:02 | Enhance the [/info/e33da6d5dc964db8|EXISTS-to-JOIN optimization] so that the inserted JOIN terms are not required to be on the inner-most loops, as long as all dependencies for the EXISTS-to-JOIN loops are in outer loops. This addresses the performance concern of [forum:/forumpost/2026-01-21T19:49:04z|forum post 2026-01-21T19:49:04z]. Test cases in TH3. (check-in: 298d5c8fa6 user: drh tags: trunk) | |
|
2026-01-03
| ||
| 15:11 | Fix yet another bug in the [/info/e33da6d5dc964db8|EXISTS-to-JOIN] optimization, reported by [forum:/forumpost/2026-01-03T14:05:48z|forum post 2026-01-03T14:05:48z]. (check-in: f60e863e0c user: drh tags: trunk) | |
|
2026-01-02
| ||
| 17:10 | Ensure that loops created by the [/info/e33da6d5dc964db8|exists-to-join optimization] use unique cursor numbers, even if the EXISTS expression in the WHERE clause is a copy of an expression from the result-set of the SELECT. dbsqlfuzz 4f6a5213cf74fcf2a8a3e48abc2333100348c38e. (check-in: 19e57a18cb user: dan tags: trunk) | |
|
2025-12-05
| ||
| 01:33 | Another fix to [e33da6d5dc964db8]: Ensure that the EXISTS-to-JOIN break happens even if the inner loop is a "no-op" loop that never executes more than once because it is controlled by a UNIQUE index. This resolves the error reported in [forum:/forumpost/7992838ba2|forum post 7992838ba2]. Test cases are in TH3. (check-in: bbded64770 user: drh tags: trunk) | |
|
2025-11-13
| ||
| 11:36 | Fix a problem in the EXISTS-to-JOIN optimization ([e33da6d5dc964db8]) so that it works with nested WHERE and EXISTS statements. [forum:/forumpost/0704c3c41e49631b|Forum post 0704c3c41e4] (check-in: d1e901eddc user: drh tags: trunk) | |
|
2025-07-23
| ||
| 12:48 | Do not apply the [/info/e33da6d5dc964db8|EXISTS-to-JOIN optimization] if the subquery contains a LIMIT clause. [forum:/forumpost/2025-07-23T10:59:14z|forum post 2025-07-23T10:59:14z]. (check-in: 314c493f27 user: drh tags: trunk) | |
Context
|
2025-07-08
| ||
| 20:28 | Adjustments to test/incrblob4.test so that it works on both Linux and Mac in spite of error message differences between those platforms. Minor change to termIsEquivalent() to provide 100% MC/DC. (check-in: 720387f860 user: drh tags: trunk) | |
| 19:53 | New optimizations to detect early when queries return no rows due to tables being empty. This includes the EXISTS-to-JOIN optimization that tries to transform EXISTS constraints into additional terms of the FROM clause. (check-in: e33da6d5dc user: drh tags: trunk) | |
| 19:02 | Fix a problem with the fix in [5cb8e342e1]. (check-in: 043ff54fb7 user: dan tags: trunk) | |
| 17:28 | Enable the EXISTS-to-JOIN optimization if the outer query has no FROM clause. (Closed-Leaf check-in: 1b9b124f9a user: drh tags: empty-table-optimizations) | |
Changes
Changes to src/btree.c.
Changes to src/btree.h.
Changes to src/build.c.
Changes to src/resolve.c.
Changes to src/select.c.
Changes to src/shell.c.in.
Changes to src/sqliteInt.h.
Changes to src/vdbe.c.
Changes to src/where.c.
Changes to src/wherecode.c.
Changes to test/eqp.test.
Added test/existsexpr.test.
Added test/existsexpr2.test.
Added test/existsfault.test.
Changes to test/json101.test.
Changes to test/notnull2.test.