1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-01 06:27:03 +03:00

In the query planner, add a heuristic that will reduce the cost of a full

table scan for a materialized view or subquery if the full scan is the
outer-most loop.  This is shown to speed up some queries.

FossilOrigin-Name: 609fbb94b8f01d6792e5941ab23ce041313d359f6788c4dde6b1ca749ab49137
This commit is contained in:
drh
2022-09-01 10:29:02 +00:00
parent 9c3a114ca0
commit a3fc683c80
6 changed files with 26 additions and 14 deletions

View File

@ -212,10 +212,11 @@ do_execsql_test 6.1 {
} {1 1 2 2 3 3 4 4 5 5 6 6 7 7}
do_execsql_test 6.2 {
SELECT * FROM t2, (SELECT x, count(*) OVER (ORDER BY x) FROM t1);
SELECT * FROM t2, (SELECT x, count(*) OVER (ORDER BY x) FROM t1)
ORDER BY 1, 2;
} {
b 1 1 b 2 2 b 3 3 b 4 4 b 5 5 b 6 6 b 7 7
a 1 1 a 2 2 a 3 3 a 4 4 a 5 5 a 6 6 a 7 7
b 1 1 b 2 2 b 3 3 b 4 4 b 5 5 b 6 6 b 7 7
}
do_catchsql_test 6.3 {