mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Update matching_candidates_in_table() to treat all conditions similar
Fixed also that the 'with_found_constraint parameter' to matching_candidates_in_table() is as documented: It is now true only if there is a reference to a previous table in the WHERE condition for the current examined table (as it was originally documented) Changes in test results: - Filtered was 25% smaller for some queries (expected). - Some join order changed (probably because the tables had very few rows). - Some more table scans, probably because there would be fewer returned rows. - Some tests exposes a bug that if there is more filtered rows, then the cost for table scan will be higher. This will be fixed in a later commit.
This commit is contained in:
@ -3480,7 +3480,7 @@ EXPLAIN
|
||||
SELECT a, c, d, f FROM t1,t2 WHERE a=c AND b BETWEEN 4 AND 6 AND a > 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY,b b 5 NULL 3 Using index condition; Using where
|
||||
1 SIMPLE t2 ref c c 5 test.t1.a 2
|
||||
1 SIMPLE t2 ALL c NULL NULL NULL 18 Using where; Using join buffer (flat, BNL join)
|
||||
DROP TABLE t1, t2;
|
||||
create table t1 (
|
||||
a int unsigned not null auto_increment primary key,
|
||||
|
Reference in New Issue
Block a user