summaryrefslogtreecommitdiff
path: root/storage/connect/ha_connect.h
diff options
context:
space:
mode:
Diffstat (limited to 'storage/connect/ha_connect.h')
-rw-r--r--storage/connect/ha_connect.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/storage/connect/ha_connect.h b/storage/connect/ha_connect.h
index 71ceb7974ba..ca3b69bb552 100644
--- a/storage/connect/ha_connect.h
+++ b/storage/connect/ha_connect.h
@@ -308,13 +308,18 @@ public:
/** @brief
Called in test_quick_select to determine if indexes should be used.
*/
- virtual double scan_time() { return (double) (stats.records+stats.deleted) / 20.0+10; }
+ virtual IO_AND_CPU_COST scan_time()
+ { return { 0, (double) (stats.records+stats.deleted) * avg_io_cost() }; };
/** @brief
This method will never be called if you do not implement indexes.
*/
- virtual double read_time(uint, uint, ha_rows rows)
- { return (double) rows / 20.0+1; }
+ virtual IO_AND_CPU_COST keyread_time(uint index, ulong ranges, ha_rows rows,
+ ulonglong blocks)
+ {
+ return { 0, (double) rows * 0.001 };
+ }
+
/*
Everything below are methods that we implement in ha_connect.cc.