Commit Graph

23 Commits

Author SHA1 Message Date
drh
bd462bcc10 Improvements to EXPLAIN QUERY PLAN formatting. The MULTI-INDEX OR now shows
a separate "INDEX" subtree for each index.  SCALAR SUBQUERY entries provide
a subquery number that is related back to the .selecttrace output.

FossilOrigin-Name: 7153552bac51295c56a1c42ca79d57195851e232509f9e9610375692f48c7e86
2018-12-24 20:21:06 +00:00
drh
5d72d9245d Make a separate limb in the EXPLAIN QUERY PLAN output for the various lines
associated with the OR-optimization.

FossilOrigin-Name: 75ac7b4e4fd0811ca80c719badacff207e0bbd00ac64dde3b3d4ec676fad472d
2018-05-04 00:39:43 +00:00
drh
b3f0276b9e Fix test cases so that they work with the new EXPLAIN QUERY PLAN output
format.  Only some of the cases have been fixed.  This is an incremental
check-in.

FossilOrigin-Name: 5f0e803e33aa557865d5fc830d9202d628de9a94c9757058ca48f1a560702cd3
2018-05-02 18:00:17 +00:00
drh
92a8277149 Add a test case of the form "WHERE a<2 OR a<3" using PRAGMA count_changes.
This test case was failing before the 3.9.0 release.

FossilOrigin-Name: 177862c1d50ba899d890fbc35f35e7423bc6aed5
2015-12-08 04:18:33 +00:00
drh
4fe425ad79 "make test" now passing.
FossilOrigin-Name: addd7f466d6ff55f82d907286650c26b06e9397b
2013-06-12 17:08:06 +00:00
drh
5822d6feb2 Fix test cases for the new EXPLAIN QUERY PLAN format. Add the
wherecosttest tool.  Other fixes to logarithm cost.

FossilOrigin-Name: aa580e368e3c398b8377b80342dfdd906324c248
2013-06-10 23:30:09 +00:00
drh
331b67c151 Candidate fix for the optimizer problem described in ticket
[b7c8682cc17f3] which can causes a LEFT JOIN to be changed
into a INNER JOIN if there are OR terms in the WHERE clause.

FossilOrigin-Name: 0dc4cb935514131c99172175d57feec3a1743aa9
2012-03-09 22:02:08 +00:00
drh
85ae206e69 More test cases for the OR optimization.
FossilOrigin-Name: 4997d8b81cd3ea7c708911bfece00020d11224f9
2011-10-07 16:08:28 +00:00
dan
4bc39fa188 Change the EXPLAIN QUERY PLAN output to use "USING INDEX" instead of "BY INDEX", and to use "SEARCH" instead of "SCAN" for loops that are not full-table scans.
FossilOrigin-Name: 6611b76b0296875fb9903b25dfaa783a9c12eaa1
2010-11-13 16:42:27 +00:00
dan
acf1987d18 Fix a bug in the EXPLAIN QUERY PLAN code.
FossilOrigin-Name: 7ae068952fba4395b4aa437613a5ed2bd9ddf941
2010-11-11 11:43:01 +00:00
dan
47eb16d4ce Modifications to test cases to account for new EXPLAIN QUERY PLAN output.
FossilOrigin-Name: 30904ef8412348464e893e9e1551ef22cad24a3e
2010-11-11 10:36:25 +00:00
drh
020efb1666 Add new WHERETRACE macros for better diagnostics of the query planner.
Added a new test case for the performance regression fixed by the previous
check-in.

FossilOrigin-Name: 1e0db99797be2821716de7138931ebd5cf8fa63b
2010-10-21 03:13:58 +00:00
drh
ed754ce2cc Further refinements to table order selection on join query planning.
FossilOrigin-Name: defaf0d99a807027f8883bf821b6482025f9f54e
2010-04-15 01:04:54 +00:00
drh
98cdf62690 Continuing refinements of the range-scan optimizations in where.c.
The range scores are changed from an integer 1..9 to 0..100.

FossilOrigin-Name: f0c24b5fb86940f1a88adfb39cc4b9cbfcc66f8a
2009-08-20 18:14:42 +00:00
drh
c4ac22e905 Disable the LIKE optimization if the affinity of the LHS column is
not TEXT.  Ticket #3901. (CVS 6727)

FossilOrigin-Name: a255c645c46ae03b65f862858fe57e462076e1fc
2009-06-07 23:45:10 +00:00
danielk1977
1d46146b58 Attempt to optimize virtual table queries with 'OR' expressions in the WHERE clause. (CVS 6527)
FossilOrigin-Name: f61e4cd93682fd98bea2a71d346f9eaa68454390
2009-04-21 09:02:45 +00:00
drh
a7e770612b Make sure the OR-clause optimizer takes the cost of sorting into account.
Reset the rowid cache on the OP_Rewind and OP_Last opcodes.  Bump the
version number so that we can do an emergency release.  Ticket #3581. (CVS 6173)

FossilOrigin-Name: d28b58209bf5eb575d0cad8dc71ac043395c6471
2009-01-14 00:55:09 +00:00
drh
04bbcd5ce9 Fix a bug in the multi-index OR cost estimator. Remove leftover "breakpoint"
commands from test scripts. (CVS 6086)

FossilOrigin-Name: b090d5736d7eaec17a39d3133e1587b1d2a42acb
2008-12-30 17:55:00 +00:00
drh
239080fbd5 Still more test cases in where7.test. (CVS 6080)
FossilOrigin-Name: eb9ba5fe70df56ee00828f7dbaf71ae6f825737d
2008-12-30 14:40:06 +00:00
drh
1cfdce1c45 Add many new test cases to where7.test. (CVS 6079)
FossilOrigin-Name: 174985831f9c8f5c393556d3248b01852573abc7
2008-12-30 14:14:03 +00:00
drh
ca8c4667a8 Multi-index OR optimizer response to ORDER BY rowid.
But fix in sqlite3_stmt_status(): report a full table scan
when "ORDER BY rowid" is used without constraints. (CVS 6069)

FossilOrigin-Name: 3464d369d3b6899ec726cf5b42b68b1dac2ba982
2008-12-28 20:47:02 +00:00
drh
294352578e Optimize WHERE clauses that constain AND, BETWEEN, and LIKE terms as operands
of an OR. (CVS 6068)

FossilOrigin-Name: 67cf24b30e087796cfb0fccf47328e72ade5ecdc
2008-12-28 18:35:08 +00:00
drh
23d04d5a20 Continuing improvements to the multi-index OR-clause optimizer. Added a
few simple test cases. (CVS 6062)

FossilOrigin-Name: 55d4f493e7df8515574a75caec9967d6c71b6012
2008-12-23 23:56:22 +00:00