Commit c41ab95a authored by Monty's avatar Monty

Remove rows and cost from optimizer trace for not usable key parts

parent 886d740a
......@@ -9417,8 +9417,6 @@ S
{
"access_type": "ref",
"index": "PRIMARY",
"rows": 1.79769e308,
"cost": 1.79769e308,
"chosen": false,
"cause": "no predicate for first keypart"
}
......
......@@ -8085,7 +8085,6 @@ best_access_path(JOIN *join,
SplM_plan_info *spl_plan= 0;
table_map spl_pd_boundary= 0;
Range_rowid_filter_cost_info *filter= 0;
const char* cause= NULL;
enum join_type best_type= JT_UNKNOWN, type= JT_UNKNOWN;
disable_jbuf= disable_jbuf || idx == join->const_tables;
......@@ -8113,6 +8112,7 @@ best_access_path(JOIN *join,
TABLE *table= s->table;
double best_records= DBL_MAX;
uint max_key_part=0;
const char *cause= NULL;
/* Test how we can use keys */
rec= s->records/MATCHING_ROWS_IN_OTHER_TABLE; // Assumed records/key
......@@ -8661,7 +8661,9 @@ best_access_path(JOIN *join,
table->key_info[filter->key_no].name);
}
}
trace_access_idx.add("rows", records).add("cost", tmp);
if (!cause)
trace_access_idx.add("rows", records).add("cost", tmp);
if (tmp + 0.0001 < best_time - records/TIME_FOR_COMPARE)
{
......@@ -8680,7 +8682,6 @@ best_access_path(JOIN *join,
trace_access_idx.add("chosen", false)
.add("cause", cause ? cause : "cost");
}
cause= NULL;
} /* for each key */
records= best_records;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment