mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Remove rows and cost from optimizer trace for not usable key parts
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user