Commit Graph

16 Commits

Author SHA1 Message Date
drh
175b8f06f7 Remove support for STAT3. The sqlite_stat3 tables are ignored, if they
exist.  STAT4 continues to work as it always has, and as it is a superset of
STAT3 is the recommended replacement.

FossilOrigin-Name: 1e17ea2fd1df4ad49138c787c8fe3207dd0c25c93f9001d52a9b69f8c12e841c
2019-08-08 15:24:17 +00:00
drh
2ad07d96b6 Improved fix for ticket [ced41c7c7d6b4d36] that keeps skip-scan enabled,
but avoids identifying a skip-scan as order-distinct (because it is not)
and thus forces a separate b-tree to implement the DISTINCT clause of a
query.  This undoes check-in [a871d69c6de65038] and substitutes a new fix.

FossilOrigin-Name: 89bf0399e87be76e7b264e0a35e8a6d3af0f9e71123a929c20754882b636ca70
2019-07-30 14:22:10 +00:00
drh
822bc969f6 Disable the skip-scan optimization for DISTINCT queries.
Fix for ticket [ced41c7c7d6b4d36]

FossilOrigin-Name: a871d69c6de65038360aa6142fbad22689fb347e526cca56bb83e695c1441fbe
2019-07-30 01:17:03 +00:00
dan
6cf3009f6c Add further tests so that veryquick.test covers all vdbe branches.
FossilOrigin-Name: cbc67de5a3937fa65811ed7c13e870699c895660dc2132cf9d3cf5d83364e344
2019-04-05 20:47:15 +00:00
dan
e882551935 Add a test-control to disable the skip-scan optimization.
FossilOrigin-Name: 650a3fe03d61068e06f3097878a777ca8ed713a769444cdb3f8be7d1e19a0b83
2018-07-12 19:14:39 +00:00
drh
9a2e5169a4 Fix a segfault introduced by the row-value enhancement that comes up on
a skip-scan where the first term of the index is unconstrained and the
second term is of the form "columm IN (SELECT...)".

FossilOrigin-Name: 2401ea5acfeee8042489d1db38036ff86e8a6916
2016-09-19 11:00:42 +00:00
drh
99bbcc8287 Undo some unhelpful changes to skip-scan scoring that were added
by the check-in [9e2b2681] that improved scoring of index scan.

FossilOrigin-Name: c7d51934a4f30d096bb79fc509fc9dd0df5d89a4
2016-07-29 01:32:36 +00:00
drh
d3e3f0b46e The sqlite3ExprCodeGetColumn() is not guaranteed to put the result in the
register requested.   Fix the skip-scan code generator for WITHOUT ROWID
tables so that it always checks the register and copies the result if it
lands in the wrong register.  Fix for ticket [8fd39115d8f46ece70e7d4b3].

FossilOrigin-Name: 793e206f9032d9205bdb3f447b136bed9a25fa22
2015-07-23 16:39:33 +00:00
drh
f9df2fbdcd Adding the "noskipscan" token to an sqlite_stat1.stat field prevents an
index for being used with the skip-scan algorithm.

FossilOrigin-Name: 00fe09505792cd0d104b2da9d040f023e30fa871
2014-11-15 19:08:13 +00:00
drh
14f0e2128a Adjust skip-scan cost estimates slightly so that a full table scan is
preferred over a skip-scan to a column with only two distinct values.

FossilOrigin-Name: ae9a42b268ad3f7d21a5813bb931e795c6917014
2014-09-23 01:40:59 +00:00
dan
e96f2df3dd Changes to the output of EXPLAIN QUERY PLAN to make it clearer when a query uses the PRIMARY KEY index of a WITHOUT ROWID table.
FossilOrigin-Name: 9268df305b90ac11e44b3107bbab5becf38860b7
2014-05-23 17:17:06 +00:00
drh
89212fb9f9 Adjustments to the cost computation for the skip-scan query plan, to take
into account the fact that a seek has to occur on each skip.

FossilOrigin-Name: 0769eebd028ce31375cf93509a1d3687f7b117eb
2014-03-10 20:12:31 +00:00
drh
6c1de308f2 Make sure the WhereLoop.aLTerm[] array is large enough when processing
the skip-scan optimization.  Fix for ticket [520070ec7fbaac].

FossilOrigin-Name: 46d040591f27be01b1860344f8a268797fe344f4
2013-12-22 20:44:10 +00:00
drh
d24474475e Import the "PRAGMA vdbe_eqp" enhancement and the enhanced EXPLAIN formatting
the shell from trunk.  Fix a bug in skip-scan and add a test case to prevent
a regression.

FossilOrigin-Name: f668616a29686f3ce532731c534b168e536adbb5
2013-11-13 19:01:41 +00:00
drh
2e5ef4ed77 Improve the way that skip-scan loops are constructued. Add test cases.
Improved the scoring of skip-scan loops.

FossilOrigin-Name: 5e75ab93881b85801cb4ebf70f2063ff7c51ac19
2013-11-13 16:58:54 +00:00
drh
c2b23e7a98 Add test cases for skip-scan. Enhance "do_test" so that if the expected result
is of the form "/*..*/" or "~/*..*/" it treats the expected result as a glob
pattern rather than as a regular expression.  Fix a bug in ANALYZE result
loading associated with WITHOUT ROWID tables.

FossilOrigin-Name: d3e6e9b2a74074c05429d3c341c23525504351ab
2013-11-13 15:32:15 +00:00