mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Added keyread_time() to HEAP
The default keyread_time() was optimized for blocks and not suitable for HEAP. The effect was the HEAP prefered table scans over ranges for btree indexes. Fixed also get_sweep_read_cost() for HEAP tables.
This commit is contained in:
@ -178,7 +178,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range btn btn 10 NULL 1 Using where
|
||||
explain select * from t1 where btn like "h%";
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL btn NULL NULL NULL # Using where
|
||||
1 SIMPLE t1 range btn btn 10 NULL # Using where
|
||||
explain select * from t1 where btn like "a%";
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range btn btn 10 NULL 1 Using where
|
||||
|
@ -428,14 +428,14 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range uniq_id uniq_id 8 NULL 2 Using where
|
||||
select 0+a from t1 where a in (869751,736494,226312,802616,728912);
|
||||
0+a
|
||||
869751
|
||||
736494
|
||||
226312
|
||||
802616
|
||||
728912
|
||||
736494
|
||||
802616
|
||||
869751
|
||||
explain select 0+a from t1 where a in (869751,736494,226312,802616,728912);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL uniq_id NULL NULL NULL 5 Using where
|
||||
1 SIMPLE t1 range uniq_id uniq_id 8 NULL 5 Using where
|
||||
drop table t1;
|
||||
End of 5.3 tests
|
||||
#
|
||||
|
Reference in New Issue
Block a user