dan
e03d76254c
Update a test case in wal2.test that explicitly corrupts a checksum in the wal file to account for the fact that the first byte of said checksum may initially be 0xFF.
...
FossilOrigin-Name: 2b935bdea1452505f36dc8c7aad49e6c42f4eceb
2014-05-01 10:19:16 +00:00
dan
5da73e1a09
Fix a problem in calculating the costs of "OR" scans.
...
FossilOrigin-Name: 9bbca48b42e4fe16f2188e18dc736da30a96435c
2014-04-30 18:11:55 +00:00
dan
4243e27f22
Modify the way the costs of various query plans are estimated. If the user supplies a likelihood() value (or equivalent) on an indexed WHERE constraint, use it to estimate the number of index rows visited.
...
FossilOrigin-Name: 90e36676476e8db00658772e6c938242f766d306
2014-04-30 15:22:25 +00:00
dan
8164722c58
Add text to the header comment of whereLoopAddBtree() describing how the costs of various b-tree loops are estimated.
...
FossilOrigin-Name: 05e6e16cb28c9ffb4596bd2ef81f687c5403ecbb
2014-04-30 15:00:16 +00:00
dan
75525cbe24
Update a couple of test cases to account for the fact that this branch prefers an index scan and partial sort over a full-table scan and full external sort.
...
FossilOrigin-Name: 9b975bf33cd8fc28c64183a9642bf9fb436a4746
2014-04-30 14:53:21 +00:00
dan
4a6b8a05cd
Fix a couple of out-of-date comments in where.c.
...
FossilOrigin-Name: eefeda32d54efbbdf7d20b719299eda48b891fae
2014-04-30 14:47:01 +00:00
drh
253666e520
Improved rendering of LogEst values corresponding to real values near 0.0
...
in the tool/logest.c utility program.
FossilOrigin-Name: 32910c8c595858245bb7ecfe3aa0f90eeae641af
2014-04-30 14:22:38 +00:00
drh
224155dd1c
Fix long-standing typos in comments.
...
FossilOrigin-Name: b9f91317c34d07769a95dc2f905a6ccabceb64a3
2014-04-30 13:19:09 +00:00
dan
264d2b97a9
Test that the default values used when sqlite_stat1 data is not available are calculated correctly. Fixes for the same.
...
FossilOrigin-Name: e2d42f909de85a0586389f2dc0e654f7af2e351a
2014-04-29 19:01:57 +00:00
dan
e4618fb30d
Merge trunk changes into this branch.
...
FossilOrigin-Name: d74299f037f3a6a4b3bce8b4d1c76c407c1f3b3e
2014-04-29 16:46:24 +00:00
dan
09e1df6c00
Ignore likelihood() values on indexed IPK lookups.
...
FossilOrigin-Name: 5bb7757a7b32a74482d3e93e9c9eea02273fe981
2014-04-29 16:10:22 +00:00
dan
67a03cfd6e
Fix a test case so that it updates sqlite_stat1 consistently.
...
FossilOrigin-Name: 2dc5a0b55567f13f0528ed17242e680cde2f2a29
2014-04-29 12:01:35 +00:00
dan
7de2a1faf6
Do not reduce the number of rows scanned at all for "IS NOT NULL" constraints. Fix a bug in calculating the number of rows visited by scans of partial indicies.
...
FossilOrigin-Name: a8ae93f0cffa116df0ba34d46a53f49d42dace41
2014-04-28 20:11:20 +00:00
dan
42685f211e
The trunk assumes that an open range constraint on an indexed term (col>?) term matches 1/4 of the indexed rows, and that a closed constraint (col BETWEEN ? AND ?) matches 1/64. Change this branch to do the same.
...
FossilOrigin-Name: 4047ac75e2a8f0b330255501c42e4f04e5ab500d
2014-04-28 19:34:06 +00:00
drh
65e6b0dd12
Add the sqlite3_rtree_query_callback() API to the RTree virtual table.
...
(Cherrypick from the sessions branch.)
FossilOrigin-Name: af2cbe64adab5f9e3b0f3da00d06428088589d7f
2014-04-28 17:56:19 +00:00
dan
6b6828625b
Update unordered.test to take into account for the fact that SQLite now prefers a full-table scan over a non-covering index scan that visits a large percentage of the table rows.
...
FossilOrigin-Name: 20f468dfbcb247e51446fad411a6e6cc0d130411
2014-04-28 15:11:25 +00:00
dan
9881d60d17
Add an extra column to a table in analyze9.test to give the planner a little more reason to select an index.
...
FossilOrigin-Name: 1b95544f84bf83c28cc15f6d0690fdf8a6bb3941
2014-04-28 12:08:23 +00:00
dan
b51926e67c
Update test script analyze3.test to account for the fact that SQLite now prefers a full-table scan over a non-covering index scan that visits a large percentage of the table rows.
...
FossilOrigin-Name: 35f46a55d866b9a87c1321aab8e0cfe86ccadb93
2014-04-28 10:00:59 +00:00
dan
e3bfbb7284
Modify internal function whereLoopAdjustCost() so that it does not prefer a skip-scan over a regular index scan even if the regular scan uses a subset of the WHERE terms used by the skip-scan.
...
FossilOrigin-Name: 88a5758dcce891eb7be15432ebdc9f80071d413b
2014-04-28 09:35:31 +00:00
dan
440e6ff3b0
Fix an error in estimating of the number of rows visited by a range scan.
...
FossilOrigin-Name: d491de62fce69d93e89f65f7713972f7c2c451f7
2014-04-28 08:49:54 +00:00
dan
2dd3cdcfab
Fix an sqlite3_stmt_status() problem caused by recent changs on this branch.
...
FossilOrigin-Name: dee204092421a239f9f60ab83c3a5b3e24d1baea
2014-04-26 20:21:14 +00:00
drh
1f8bb4b0a8
Update requirements marks to fix typos in the requirements text.
...
No changes to code.
FossilOrigin-Name: f5a263658187250044afc1a74000e6f6962733ca
2014-04-26 19:23:14 +00:00
drh
453e0261df
Allow the xfer optimization to proceed if the DEFAULT on the very first
...
column of the two tables is different. This is a refinement of the
fix for ticket [f67b41381a].
FossilOrigin-Name: 349f483499dd685a8da94923b6bd810a52e5e236
2014-04-26 17:52:08 +00:00
dan
9940e2aa45
Avoid transfering records between tables unless the default values for all columns are the same. Fix for [f67b41381a].
...
FossilOrigin-Name: f8c4c495e6de1f124d205383d4bafa46accbff5c
2014-04-26 14:07:57 +00:00
dan
8ad1d8ba38
If the user provides likelihood() data for a WHERE clause term used as part of an index key, have the planner use it when calculating the expected number of rows visited by the loop.
...
FossilOrigin-Name: c51efaa5d29ee0a91b9e6a83a8dd82530670811a
2014-04-25 20:22:45 +00:00
drh
b79c718f1a
Add test cases to ensure correct operation of joins with a virtual table
...
that include DISTINCT and ORDER BY clauses. Verification for ticket
[388d01d4bb8f9].
FossilOrigin-Name: 5ada136f43ce744ae8c349eff39838eb44611b6e
2014-04-25 17:37:16 +00:00
dan
cfc9df76e1
Store values loaded from the stat1 table as logarithmic values in memory.
...
FossilOrigin-Name: 1bd74c49ddab6f53bb6eaa57907eff44c2580dd6
2014-04-25 15:01:01 +00:00
drh
9dfaf621d1
Make sure ORDER BY clauses on joins that involve virtual tables and that
...
have a DISTINCT clause work correctly. This is a candidate fix for
ticket [388d01d4bb8f9]. Test cases for that ticket will be checked in
separately.
FossilOrigin-Name: 171138122690faafde0dcab0201b90bdf02d3637
2014-04-25 14:42:17 +00:00
drh
a01c7c70fd
When VDBE_PROFILE is enabled, ignore negative opcode times, which sometimes
...
occur, perhaps due to context swaps.
FossilOrigin-Name: 4e88042f9d3e678914da96c0eb276f3d8fca5a94
2014-04-25 12:35:31 +00:00
dan
aa9933c115
Changes to the way the planner calculates the costs of various table and index scans. Some test cases still failing.
...
FossilOrigin-Name: c5a6ec0a880652dc8f4593d9f7acd58ddc3dc5f3
2014-04-24 20:04:49 +00:00
drh
f0582f43dd
Comment tweaks on the test case for the [b75a9ca6b0] bug fix.
...
FossilOrigin-Name: 65d2544af9adc1e2f1d193e57f8be0422fb0d5eb
2014-04-21 13:36:54 +00:00
dan
374cd78c1d
Avoid discarding an ORDER BY clause in the case where an identical GROUP BY clauses uses an index to group, but not sort, the rows. Fix for [b75a9ca6b0].
...
FossilOrigin-Name: de9a490f594183f337a2ec9e0f87792eac83548b
2014-04-21 13:21:56 +00:00
drh
b355c2cc12
Clean up the proper-subset cost adjustment logic to make it more compact
...
and easier to read and so that full branch test coverage is more easily
obtained.
FossilOrigin-Name: 9a5d38c79d2482a23bcfbc3ff35ca4fa269c768d
2014-04-18 22:20:31 +00:00
drh
71794dbaeb
Add the SQLITE_RUNTIME_BYTEORDER compile-time option to force SQLite to check
...
the processor byte-order at run-time. Add additional compile-time byte order
checks for ARM, PPC, and SPARC.
FossilOrigin-Name: 2c5363873a6f990a0abaacac6303acd46b48befc
2014-04-18 00:49:29 +00:00
drh
2cf4acbd9f
Add the SQLITE_TESTCTRL_BYTEORDER test control to interrogate SQLite's notion
...
of the processor byte order and whether the byte order is known at compile-time
or determined at run-time.
FossilOrigin-Name: 9c6961967ae00e563ebe2859eaf2639a79f2cb01
2014-04-18 00:06:02 +00:00
drh
65b9ac5224
Make sure the undocumented sqlite_rename_parent() function does not
...
crash even if it is invoked with NULL arguments.
Ticket [264b970c4379fd4b94]
FossilOrigin-Name: c6fa8d0d82805be230f672eabccdfa5680d4ddfd
2014-04-14 19:48:25 +00:00
drh
d249090450
Remove the unused second argument from sqlite3ExprCachePop(). Add an
...
ALWAYS() on an always-true conditional in sqlite3VdbeResolveLabel().
FossilOrigin-Name: ab23abf392175d3e256ff619b13abbbe732a49ed
2014-04-13 19:28:15 +00:00
drh
87744513e7
Make sure column cache elements are cleared correctly when jumping over
...
code for key generation in a partial index.
Fix for ticket [2ea3e9fe6379fc3f6].
FossilOrigin-Name: 3122b8364082be783821da01d4af2af6a9586327
2014-04-13 19:15:49 +00:00
drh
d83cad235a
Modify the OR-clause handling so that it can safely deal with OR-clause
...
with 17 or more terms. Fix for ticket [10fb063b1179be53ea0b53bb].
FossilOrigin-Name: a67b5312f63909737c052fe58ab5772d45530d49
2014-04-10 02:24:48 +00:00
drh
48e080b26c
Performance improvements when reading large blobs, especially if
...
SQLITE_DIRECT_OVERFLOW_READ is defined.
FossilOrigin-Name: 2312eb6a9eb31051db4e0baf19e033ba39adc7b1
2014-04-04 18:49:19 +00:00
drh
853546d047
Merge changes to the query planner that strive to ensure that any index
...
usage that is a proper subset of some other index usage always has a slightly
higher cost.
FossilOrigin-Name: 683dd379a293b2f330e1e4cd746f190527fe48ee
2014-04-04 18:20:35 +00:00
drh
1fb6a11072
Ensure the "PRAGMA journal_mode=WAL" works coming from any other journal_mode
...
with ATTACH-ed databases.
FossilOrigin-Name: e54330b43127e46fc6494748cbb353a6fc91cfd7
2014-04-04 14:12:52 +00:00
drh
c438df1be0
Use OP_Copy instead of OP_SCopy when moving results out of a subquery,
...
to prevent the subquery results from changing out from under the outer
query. Fix for ticket [1e64dd782a126f48d78].
FossilOrigin-Name: d5513dfa23baa0b0a095aaf17d19aacd30dcef61
2014-04-03 16:29:31 +00:00
drh
831116d164
Fix a typo in the "Synopsis:" comment for the OP_VFilter opcode.
...
FossilOrigin-Name: 48ecdd4aff03741f96c070dced69c3c273b652cb
2014-04-03 14:31:00 +00:00
drh
54d0d2dd9a
In the command-line shell, run set writable_schema before running the
...
".clone" command.
FossilOrigin-Name: 9d2ae6342c8afa904bec591ebe134ff7f536b71c
2014-04-03 00:32:13 +00:00
drh
a38c9516e8
Remove an unnecessary conditional, replacing it with an assert().
...
Improvements to comments.
FossilOrigin-Name: 834bf1c367e1ccd498c7f9f843be2d2aa11ffb3c
2014-04-01 01:24:34 +00:00
drh
4c417181c2
Fix a compiler warning when SQLITE_DIRECT_OVERFLOW_READ is defined.
...
Minor performance enhancement and size reduction.
FossilOrigin-Name: 96385dc460545807a5c8fcf6280a971700f84866
2014-03-31 23:57:41 +00:00
drh
e4529c5724
Merge in the latest changes and fixes from trunk.
...
FossilOrigin-Name: f6211540c9d66a08dc580dd733e4f4a98968ae30
2014-03-31 22:03:32 +00:00
drh
d3c156638a
Remove an unnecessary conditional.
...
FossilOrigin-Name: 7473c4dfc10a47594affa6f4e071a08dc8838c0c
2014-03-31 20:05:20 +00:00
drh
3fb183d2f7
Also make sure an index that is a proper subset of some other index has a
...
higher cost than that other index. Add test cases.
FossilOrigin-Name: b7830d232b073a197aa1092e78cb24e88cb10fd3
2014-03-31 19:49:00 +00:00