1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MWL#90: Address review feedback part #5

This commit is contained in:
Sergey Petrunya
2011-03-22 13:09:55 +03:00
parent 809a805251
commit b77e3dc9f4
5 changed files with 101 additions and 135 deletions

View File

@@ -826,15 +826,12 @@ void get_delayed_table_estimates(TABLE *table,
((subselect_hash_sj_engine*)item->engine);
JOIN *join= hash_sj_engine->materialize_join;
double rows= 1;
double read_time= 0.0;
double rows;
double read_time;
/* Calculate #rows and cost of join execution */
for (uint i= join->const_tables; i < join->tables; i++)
{
rows *= join->best_positions[i].records_read;
read_time += join->best_positions[i].read_time;
}
get_partial_join_cost(join, join->tables, &read_time, &rows);
*out_rows= (ha_rows)rows;
*startup_cost= read_time;
/* Calculate cost of scanning the temptable */