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

Optimizer Trace: save all info needed for replay

    XMLWordPrintable

Details

    Description

      Optimizer trace contains a lot of info describing the query:

      • Original query text
      • Definitions of all used VIEWs
      • All kinds of estimates that the optimizer used:
        • records_in_range estimates
        • index statistics used by
        • selectivity estimates
        • table read costs
      • Indexes considered by the optimizer

      This makes it possible to debug an optimizer problem: re-run the optimizer and manually re-create the environment by "faking" the record counts and the estimates.

      There are two problems

      • 1. Optimizer trace is not fully self-contained.
      • 2. Re-creating the environment is labor-intensive (I wrote dirty patches that put the fake statistics in place)

      This task is about solving #1, and possibly #2.

      For #1, we need:

      • Column definitions (their datatypes. Basically, SQL definitions).
      • TODO: anything else?

      Attachments

        Activity

          People

            Unassigned Unassigned
            psergei Sergei Petrunia
            Votes:
            0 Vote for this issue
            Watchers:
            5 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.