mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Removed /2 of InnoDB ref_per_key[] estimates
The original code was there to favor index search over table scan. This is not needed anymore as the cost calculations for table scans and index lookups are now more exact.
This commit is contained in:
@ -208,8 +208,8 @@ t2
|
||||
where t1.id = dt.id and t1.itemid = dt.itemid and t2.id=t1.itemid;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t2 ALL NULL NULL NULL NULL 1
|
||||
1 PRIMARY t1 ref idx idx 4 test.t2.id 1
|
||||
1 PRIMARY <derived2> ref key0 key0 9 test.t2.id,test.t1.id 1
|
||||
1 PRIMARY <derived2> ref key1 key1 4 test.t2.id 1
|
||||
1 PRIMARY t1 ref idx idx 4 test.t2.id 3 Using where
|
||||
2 DERIVED t3 ref idx1,idx2 idx1 4 const 5 Using where; Using index
|
||||
select t1.id, t1.itemid, dt.id, t2.id
|
||||
from t1,
|
||||
@ -227,8 +227,8 @@ t2
|
||||
where t1.id = dt.id and t1.itemid = dt.itemid and t2.id=t1.itemid;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t2 ALL NULL NULL NULL NULL 1
|
||||
1 PRIMARY t1 ref idx idx 4 test.t2.id 1
|
||||
1 PRIMARY <derived2> ref key0 key0 9 test.t2.id,test.t1.id 1
|
||||
1 PRIMARY <derived2> ref key1 key1 4 test.t2.id 1
|
||||
1 PRIMARY t1 ref idx idx 4 test.t2.id 3 Using where
|
||||
2 DERIVED t3 ref idx1 idx1 4 const 5 Using where; Using index
|
||||
select t1.id, t1.itemid, dt.id, t2.id
|
||||
from t1,
|
||||
|
Reference in New Issue
Block a user