Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-22535

TABLE::initialize_quick_structures() takes 0.5% in oltp_read_only

    XMLWordPrintable

Details

    Description

      void TABLE::initialize_quick_structures()
      {
        bzero(quick_rows, sizeof(quick_rows));
        bzero(quick_key_parts, sizeof(quick_key_parts));
        bzero(quick_costs, sizeof(quick_costs));
        bzero(quick_n_ranges, sizeof(quick_n_ranges));
      }
      

      1. These members consume 1536 of 3520 bytes (44%) of TABLE for no good reason.
      2. I doubt these arrays have to be fully initialized. I'd say they have to be initialized up to the number of indexes in the table.
      3. Assuming these are per-key variables, they should be part of something like KEY rather than something like TABLE.
      4. I generally recommend not using pre-initialization for performance reasons, but also because it tends to hide bugs from uninit-var detectors.

      Attachments

        Issue Links

          Activity

            People

              monty Michael Widenius
              svoj Sergey Vojtovich
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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