Skip to content

Commit 3ea8f30

Browse files
committed
Added compare cost for DS-MRR (multi-range-read with disk sweep)
1 parent 07b02ab commit 3ea8f30

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sql/multi_range_read.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2080,6 +2080,8 @@ bool DsMrr_impl::get_disk_sweep_mrr_cost(uint keynr, ha_rows rows, uint flags,
20802080

20812081
/* Total cost of all index accesses */
20822082
cost->index_cost= primary_file->ha_keyread_and_copy_time(keynr, 1, rows, 0);
2083+
cost->comp_cost= rows2double(rows) * primary_file->WHERE_COST;
2084+
cost->setup_cost= primary_file->MULTI_RANGE_READ_SETUP_COST;
20832085
return FALSE;
20842086
}
20852087

0 commit comments

Comments
 (0)