Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-5141

ha_mcs_impl_select_next suffers from a needless asign operator call

    XMLWordPrintable

Details

    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.

      Attachments

        Activity

          People

            leonid.fedorov Leonid Fedorov
            drrtuy Roman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.