mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Be more aggressive about reusing subqueries that appear on the RHS of IN
operators that have been replicated due to the predicate push-down optimization. FossilOrigin-Name: 2accf32b6e45a396503c29eecc14a103bcc7b4c313cde921b26b489704060177
This commit is contained in:
@ -279,13 +279,9 @@ do_eqp_test 6.1 {
|
||||
| | `--CREATE BLOOM FILTER
|
||||
| `--UNION ALL
|
||||
| |--SEARCH t02 USING INDEX t02x (w=? AND x=? AND y>? AND y<?)
|
||||
| `--LIST SUBQUERY xxxxxx
|
||||
| |--SCAN k
|
||||
| `--CREATE BLOOM FILTER
|
||||
| `--REUSE LIST SUBQUERY xxxxxx
|
||||
|--SEARCH t0
|
||||
`--LIST SUBQUERY xxxxxx
|
||||
|--SCAN k
|
||||
`--CREATE BLOOM FILTER
|
||||
`--REUSE LIST SUBQUERY xxxxxx
|
||||
}
|
||||
# ^^^^--- The key feature above is that the SEARCH for each subquery
|
||||
# uses all three fields of the index w, x, and y. Prior to the push-down
|
||||
@ -307,17 +303,9 @@ do_eqp_test 6.2 {
|
||||
| | `--CREATE BLOOM FILTER
|
||||
| `--UNION ALL
|
||||
| |--SEARCH t02 USING INDEX t02x (w=? AND x=? AND y>? AND y<?)
|
||||
| `--LIST SUBQUERY xxxxxx
|
||||
| |--CO-ROUTINE v1
|
||||
| | `--SCAN 3 CONSTANT ROWS
|
||||
| |--SCAN v1
|
||||
| `--CREATE BLOOM FILTER
|
||||
| `--REUSE LIST SUBQUERY xxxxxx
|
||||
|--SEARCH t0
|
||||
`--LIST SUBQUERY xxxxxx
|
||||
|--CO-ROUTINE v1
|
||||
| `--SCAN 3 CONSTANT ROWS
|
||||
|--SCAN v1
|
||||
`--CREATE BLOOM FILTER
|
||||
`--REUSE LIST SUBQUERY xxxxxx
|
||||
}
|
||||
do_eqp_test 6.3 {
|
||||
SELECT max(z) FROM t0 WHERE w=123 AND x IN k1 AND y BETWEEN 44 AND 55;
|
||||
@ -332,13 +320,9 @@ do_eqp_test 6.3 {
|
||||
| | `--CREATE BLOOM FILTER
|
||||
| `--UNION ALL
|
||||
| |--SEARCH t02 USING INDEX t02x (w=? AND x=? AND y>? AND y<?)
|
||||
| `--LIST SUBQUERY xxxxxx
|
||||
| |--SCAN k1
|
||||
| `--CREATE BLOOM FILTER
|
||||
| `--REUSE LIST SUBQUERY xxxxxx
|
||||
|--SEARCH t0
|
||||
`--LIST SUBQUERY xxxxxx
|
||||
|--SCAN k1
|
||||
`--CREATE BLOOM FILTER
|
||||
`--REUSE LIST SUBQUERY xxxxxx
|
||||
}
|
||||
|
||||
finish_test
|
||||
|
Reference in New Issue
Block a user