diff options
Diffstat (limited to 'sql/filesort.cc')
-rw-r--r-- | sql/filesort.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/filesort.cc b/sql/filesort.cc index 07194cb2e4f..fabe185ecfd 100644 --- a/sql/filesort.cc +++ b/sql/filesort.cc @@ -1601,7 +1601,7 @@ static bool check_if_pq_applicable(Sort_param *param, (PQ_slowness * num_rows + param->max_keys_per_buffer) * log((double) param->max_keys_per_buffer) / TIME_FOR_COMPARE_ROWID; const double pq_io_cost= - param->max_rows * table->file->scan_time() / 2.0; + param->max_rows * table->file->ha_scan_time(num_rows) / 2.0; const double pq_cost= pq_cpu_cost + pq_io_cost; if (sort_merge_cost < pq_cost) |