mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +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:
@ -4897,7 +4897,8 @@ double get_sweep_read_cost(const PARAM *param, ha_rows records)
|
||||
{
|
||||
double result;
|
||||
DBUG_ENTER("get_sweep_read_cost");
|
||||
if (param->table->file->primary_key_is_clustered())
|
||||
if (param->table->file->primary_key_is_clustered() ||
|
||||
param->table->file->stats.block_size == 0 /* HEAP */)
|
||||
{
|
||||
/*
|
||||
We are using the primary key to find the rows.
|
||||
|
Reference in New Issue
Block a user