mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fixed bug in the optimiser for FULL TABLE SCAN case:
to estimate correctly cost of full table scan we should take into account rows read and skipped on each iteration. mysql-test/r/distinct.result: Fixed test suite: now full scan is used less often mysql-test/r/join_outer.result: Fixed test suite: now full scan is used less often mysql-test/r/select_safe.result: Fixed test suite: now full scan is used less often
This commit is contained in:
@ -615,7 +615,7 @@ INSERT INTO t2 VALUES (1,1);
|
||||
explain SELECT * from t1 left join t2 on t1.id=t2.id where t2.id IS NULL;
|
||||
table type possible_keys key key_len ref rows Extra
|
||||
t1 ALL NULL NULL NULL NULL 2
|
||||
t2 index id id 8 NULL 1 Using where; Using index; Not exists
|
||||
t2 ref id id 4 t1.id 1 Using where; Using index; Not exists
|
||||
SELECT * from t1 left join t2 on t1.id=t2.id where t2.id IS NULL;
|
||||
id name id idx
|
||||
2 no NULL NULL
|
||||
|
Reference in New Issue
Block a user