Details
Description
In this code in sql_select.cc:
static COND *build_equal_items(JOIN *join, COND *cond, COND_EQUAL *inherited, List<TABLE_LIST> *join_list, bool ignore_on_conds, COND_EQUAL **cond_equal_ref, bool link_equal_fields) { THD *thd= join->thd; COND_EQUAL *cond_equal= 0; if (cond) { cond= build_equal_items_for_cond(thd, cond, inherited, link_equal_fields); cond->update_used_tables(); ...
the call for cond->update_used_tables() is not needed in most cases.
Look into all "return" in build_equal_items_for_cond().
update_used_tables() is either not needed at all, like in case when "new Item_int" is returned,
or update_used_tables() is already called inside build_equal_items_for_cond().
This task is to move the call for code->update_used_tables() from build_equal_items() into build_equal_items_for_cond(), and then to get rid of the unnecessary calls in the cases that don't really need it.
Gliffy Diagrams
Attachments
Issue Links
- blocks
-
MDEV-7950 Item_func::type() takes 0.26% in OLTP RO
-
- Closed
-
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions