1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-02 14:47:37 +03:00

Moved the function trace_plan_prefix to the optimizer trace file

Also added comments for trace_plan_prefix and the class Json_writer_temp_disable
This commit is contained in:
Varun Gupta
2019-09-10 14:01:31 +05:30
parent 7b988e5ceb
commit 71c57bcf8f
5 changed files with 39 additions and 15 deletions

View File

@ -121,7 +121,6 @@ static bool best_extension_by_limited_search(JOIN *join,
double read_time, uint depth,
uint prune_level,
uint use_cond_selectivity);
void trace_plan_prefix(JOIN *join, uint idx, table_map remaining_tables);
static uint determine_search_depth(JOIN* join);
C_MODE_START
static int join_tab_cmp(const void *dummy, const void* ptr1, const void* ptr2);
@ -9191,18 +9190,6 @@ double table_cond_selectivity(JOIN *join, uint idx, JOIN_TAB *s,
}
void trace_plan_prefix(JOIN *join, uint idx, table_map remaining_tables)
{
THD *const thd= join->thd;
Json_writer_array plan_prefix(thd, "plan_prefix");
for (uint i= 0; i < idx; i++)
{
TABLE_LIST *const tr= join->positions[i].table->tab_list;
if (!(tr->map & remaining_tables))
plan_prefix.add_table_name(join->positions[i].table);
}
}
/**
Find a good, possibly optimal, query execution plan (QEP) by a possibly
exhaustive search.