#At file:///home/mysql_src/bzrrepos_new/mysql-next-mr-opt-backporting-wl4800/ based on revid:guilhem@stripped
3221 Guilhem Bichot 2010-10-15
stop timing greedy_search().
When determinining conditions to push to a table, open the Opt_trace_object
for this table at the start, not at the end; this object thus includes
any trace generated by the range optimizer during this phase.
modified:
sql/sql_select.cc
=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc 2010-10-05 13:19:55 +0000
+++ b/sql/sql_select.cc 2010-10-15 15:57:22 +0000
@@ -7976,8 +7976,6 @@ greedy_search(JOIN *join,
Opt_trace_context *opt_trace= join->thd->opt_trace;
DBUG_ENTER("greedy_search");
- ulonglong now= my_getsystime();
-
/* number of tables that remain to be optimized */
n_tables= size_remain= my_count_bits(remaining_tables &
(join->emb_sjm_nest?
@@ -8008,8 +8006,6 @@ greedy_search(JOIN *join,
*/
DBUG_EXECUTE("opt", print_plan(join, n_tables, record_count, read_time,
read_time, "optimal"););
- now= my_getsystime() - now;
- fprintf(stderr, "greedy_search %g secs\n", ((double)now)/1e7);
DBUG_RETURN(FALSE);
}
@@ -9624,6 +9620,8 @@ static bool make_join_select(JOIN *join,
for (uint i=join->const_tables ; i < join->tables ; i++)
{
tab= join->join_tab+i;
+ Opt_trace_object oto2(thd->opt_trace);
+ oto2.add("table", tab->table->alias);
/*
first_inner is the X in queries like:
SELECT * FROM t1 LEFT OUTER JOIN (t2 JOIN t3) ON X
@@ -9908,9 +9906,7 @@ static bool make_join_select(JOIN *join,
used_tables= save_used_tables | used_tables;
save_used_tables= 0;
}
- Opt_trace_object oto2(thd->opt_trace);
- oto2.add("table", tab->table->alias).
- add("attached", tab->select_cond);
+ oto2.add("attached", tab->select_cond);
}
}
DBUG_RETURN(0);
Attachment: [text/bzr-bundle] bzr/guilhem@mysql.com-20101015155722-flzufq5xds6ie360.bundle
| Thread |
|---|
| • bzr commit into mysql-next-mr-bugfixing branch (guilhem:3221) | Guilhem Bichot | 15 Oct |