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

improve optimizer_use_condition_selectivity=5

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • Optimizer
    • None

    Description

      improve optimizer_use_condition_selectivity=5

      • use it for more than LIKE
        • basically, it could be used for any condition that is too complex to be estimated without sampling
      • use random dives, not table scan
      • get rid of optimizer_selectivity_sampling_limit
        • either continue sampling until the result converges (using some hard-coded error marging and some safety check against sampling too much)
        • or, ideally, sample as long as needed:
          • sample a little bit, say, 10 rows. the selectivity will be within some range [sel min; sel max]
          • this corresponds to two execution plans, Plan min with the cost Cost min and a Plan max with the cost Cost max
          • we don't need more precise selectivity estimates as long as the best alternative plan is outside of [Cost min; Cost max]
          • otherwise we have to sample just enough to narrow down the range until it no longer includes the best alternative plan (or until the range converges and stops shrinking)

      Attachments

        Activity

          People

            Unassigned Unassigned
            serg Sergei Golubchik
            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.