mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 20:07:13 +02:00
MDEV-19600: The optimizer should be able to produce rows=1 estimate for unique index with NULLable columns
Modify best_access_path() to produce rows=1 estimate for null-rejecting lookups on unique NULL keys.
This commit is contained in:
parent
7060b0320d
commit
f7579518e2
11 changed files with 276 additions and 37 deletions
|
|
@ -404,8 +404,8 @@ b int(11) YES NULL
|
|||
c int(11) YES NULL
|
||||
explain select * from t1,t2 where t1.b = t2.c and t1.c = t2.b;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 10
|
||||
1 SIMPLE t1 ALL b,c NULL NULL NULL 10 Using where; Using join buffer (flat, BNL join)
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 10 Using where
|
||||
1 SIMPLE t1 ref b,c b 5 test.t2.c 1 Using where
|
||||
select * from t1,t2 where t1.b = t2.c and t1.c = t2.b;
|
||||
a a b c
|
||||
1 1 1 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue