Details
-
New Feature
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
6.3.1
Description
ha_mcs_impl_select_next() function is called on every row. Its code is in dbcon/mysql/ha_mcs_impl.cpp around the line 5295 defines cal_table_info ti and then assigns to it that triggers assign op that copies complex structures. According with the perf report output I see 15% wasted by a combination of cal_table_info ctor and cal_table_info::operator=. See the screen attached. This is a part of perf record of MDB process taken with SELECT..INSERT for a table with at least 50 000 000 records.
The suggested solution is to avoid doing the expensive std::stack<shared_pointer> copies.
JFYI cal_table_info::tpl_scan_ctx_st is processing UNIONs and table execution paths.