summaryrefslogtreecommitdiff
path: root/storage/heap
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2020-03-05 14:10:03 +0200
committerMonty <monty@mariadb.org>2020-03-09 13:53:34 +0200
commitc037cdadf47fc6dd0546ddade9f9168bed8a3690 (patch)
treeaf0703eb5fcba6fdd521950a0767e1274c57d7e3 /storage/heap
parenta24d0926b9459d715709d86a84a172cdce3b1bec (diff)
downloadmariadb-git-c037cdadf47fc6dd0546ddade9f9168bed8a3690.tar.gz
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.
Diffstat (limited to 'storage/heap')
-rw-r--r--storage/heap/ha_heap.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/storage/heap/ha_heap.h b/storage/heap/ha_heap.h
index 3440c8fd205..370906bd1f6 100644
--- a/storage/heap/ha_heap.h
+++ b/storage/heap/ha_heap.h
@@ -65,8 +65,9 @@ public:
double scan_time()
{ return (double) (stats.records+stats.deleted) / 20.0+10; }
double read_time(uint index, uint ranges, ha_rows rows)
- { return (double) rows / 20.0+1; }
-
+ { return (double) rows / 20.0+1; }
+ double keyread_time(uint index, uint ranges, ha_rows rows)
+ { return (double) rows / 20.0+1; }
int open(const char *name, int mode, uint test_if_locked);
int close(void);
void set_keys_for_scanning(void);