Fix typos in comments. Provided ".wheretrace" debugging output for the
interstage heuristic module. Do omit automatic index loops in the
interstage heuristic.
Add a heuristic in between the two solver() passes of the query planner that
tries to prevent a very slow query plan in cases where the output row count
estimate is imprecise.
drh [Wed, 29 Nov 2023 16:07:59 +0000 (16:07 +0000)]
Remove Window objects from the corresponding Select.pWin list when they are
deleted, as they are, for example, when the ORDER BY clause is optimized out.
drh [Thu, 19 Oct 2023 21:05:31 +0000 (21:05 +0000)]
Ensure that when an ephemeral cursor is reopened with a second invocation of to OP_OpenEphemeral, the sequence counter is reset and the cache marked as stale. Fix for [9cdc5c46].
Drop support for the view-scan optimization as
it was causing multiple performance regressions. In its place, reduce the
estimated row count for DISTINCT subsqueries by a factor of 8.
drh [Sun, 26 Feb 2023 11:52:37 +0000 (11:52 +0000)]
In the [/info/7c2d3406000dc8ac|omit-unused-subquery-columns optimization], be
sure to remove the EP_Skip and EP_Unlikely flags from the result set expressions
that get nulled-out. dbsqlfuzz bf1d3ed6e0e0dd8766027797d43db40c776d2b15.
Also fix an incorrect ".selecttrace" code block.
drh [Thu, 16 Feb 2023 14:29:04 +0000 (14:29 +0000)]
Do not compute result columns of subqueries that are never used. Make those columns NULL instead. This optimization potentially resolves the enhancement request described by [baa5bb76c35a124c|ticket baa5bb76c35a124c].
drh [Wed, 15 Feb 2023 17:53:17 +0000 (17:53 +0000)]
Do not compute result columns of subqueries that are never used. Make those
columns NULL instead. This optimization potentially resolves the enhancement
request described by [/tktview/baa5bb76c35a124c|ticket baa5bb76c35a124c].
drh [Mon, 13 Feb 2023 12:46:22 +0000 (12:46 +0000)]
In the LIKE optimization, do not analyze the new virtual WHERE clause terms
until both have been added, since they are expected to be consecutive and
the analysis might add complementary terms.
This fixes a problem caused by [44200596aa943963] and discovered by dbsqlfuzz
and recorded as case 7e3b5983727d843b910b2d9ab556e4afcd777cfb.
drh [Fri, 10 Feb 2023 21:53:33 +0000 (21:53 +0000)]
Do a better job of detecting when a WHERE clause term might be useful to
an expression index. Fix for performance regression reported by
[forum:/forumpost/e65800d8cb|forum thread e65800d8cb].
dan [Fri, 10 Feb 2023 17:17:04 +0000 (17:17 +0000)]
Fix a problem with the fts5 trigram tokenizer and LIKE or GLOB patterns for which contain runs of 2 or fewer non-wildcard characters that are 3 or more bytes when encoded as utf-8.
drh [Thu, 9 Feb 2023 15:32:24 +0000 (15:32 +0000)]
Disable the double-quoted string misfeature by default in CLI builds.
DQS can be reenabled at run-time using the ".dbconfig dqs_dml" and
".dbconfig dqs_ddl" dot-commands.
drh [Wed, 8 Feb 2023 20:29:48 +0000 (20:29 +0000)]
Back out the 'txn' enhancement to date/time functions. The duration of a
"transaction" is confused and needs to be straightened out prior to moving
forward with this change.
drh [Wed, 8 Feb 2023 12:01:48 +0000 (12:01 +0000)]
Revert the behavior of date/time functions with no arguments so that they
once again work like 'now', even while CURRENT_TIMESTAMP and similar work
like 'txn'.
drh [Wed, 8 Feb 2023 11:34:05 +0000 (11:34 +0000)]
Change the behavior of date-time functions without any arguments (and thus
the CURRENT_TIME, CURRENT_DATE, and CURRENT_TIMESTAMP variables) so that they
work like 'txn' instead of like 'now'. This is an incompatibility with legacy,
but brings SQLite into conformance with all other SQL systems.
drh [Sun, 5 Feb 2023 20:29:10 +0000 (20:29 +0000)]
Do not use a Bloom filter if any outer loop lacks STAT1 data, since without
STAT1 data, the query planner cannot make an accurate determination of
whether or not a Bloom filter will be useful. This fixes the problem
reported by [forum:/forumpost/56de336385|forum post 56de336385].
drh [Sun, 5 Feb 2023 00:47:27 +0000 (00:47 +0000)]
Restore a test for pBt NULL that was removed by [12a14711afa6cddb] but turned
out to be necessary, as dbsqlfuzz quickly showed us. Test case added to TH3.
dan [Sat, 4 Feb 2023 19:01:17 +0000 (19:01 +0000)]
Updates to the testrunner.tcl script so that uses a separate sub-process for each test. And so that it runs the release test procedure currently handled by wapptest.tcl.
stephan [Thu, 2 Feb 2023 06:17:22 +0000 (06:17 +0000)]
Remove automatic installation of JS-global S object for the sake of client libraries which embed this library, per [forum:9d4f722c6912799d|request in the forum].
drh [Wed, 1 Feb 2023 15:41:07 +0000 (15:41 +0000)]
Just because a CTE is used more than once, does not mean it should be
tagged with M10d_Yes and thereby prohibited from participating in the
query flattening optimization. See
[forum:/forumpost/1d571c02963355ed|forum thread 1d571c02963].
drh [Mon, 30 Jan 2023 20:44:54 +0000 (20:44 +0000)]
Additional tweaks to the enhancement at [609fbb94b8f01d67] to further reduce
the cost estimate for constructing an automatic index on an ephemeral table,
in order to resolve the performance problem described by
[forum:/forumpost/1d571c0296|forum post 1d571c0296].
stephan [Sun, 29 Jan 2023 05:09:39 +0000 (05:09 +0000)]
Correct the handling of the worker1 and promiser JS files in the face of the bundler-friendly changes. Those files require separate, bundler-friendly copies.
dan [Sat, 28 Jan 2023 17:37:37 +0000 (17:37 +0000)]
Fix a problem causing "PRAGMA quick_check" to return spurious corruption errors for a WITHOUT ROWID for which all columns are either virtual or part of the primary key, and for which the order of the columns in the primary key definition is different from the order in the table.
dan [Sat, 28 Jan 2023 16:37:30 +0000 (16:37 +0000)]
Update sqllimits1.test to account for the fact that if an odd value is specified as the length in bytes of a utf-16 string, it is truncated to the largest smaller even number.