mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +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:
@@ -204,7 +204,7 @@ CREATE INDEX c2d ON t1(c2);
|
||||
SHOW INDEX FROM t1;
|
||||
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Ignored
|
||||
t1 0 PRIMARY 1 c1 A 80 NULL NULL BTREE NO
|
||||
t1 1 c2d 1 c2 A 10 NULL NULL YES BTREE NO
|
||||
t1 1 c2d 1 c2 A 5 NULL NULL YES BTREE NO
|
||||
EXPLAIN SELECT COUNT(*) FROM t1 WHERE c2 > 3;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range c2d c2d 5 NULL 32 Using where; Using index
|
||||
|
Reference in New Issue
Block a user