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

ANALYZE $stmt output in the slow query log

    XMLWordPrintable

Details

    Description

      MDEV-406 allows to execute a statement, and collect data for ANALYZE output. This task is about having ANALYZE printed in the slow query log, like originally envisioned in MDEV-407 (MDEV-407 only implemented EXPLAIN in the slow query log).

      User interface question: MDEV-407 introduced a switch:

      log-slow-verbosity=explain

      Should we keep the option name just print tabular ANALYZE output instead of tabular EXPLAIN output?
      Or, introduce another flag:

      log-slow-verbosity=analyze

      ?

      What if the user specifies both explain and analyze? Should we print both or just print analyze (since it is a superset of explain output)? Is it acceptable to always print analyze output?

      There is the same question for formatting the log. 10.0 shows EXPLAIN outputs in slow query log like this:

      # explain: id   select_type     table   type    possible_keys   key     key_len ref     rows    Extra
      # explain: 1    SIMPLE  nation  ref     PRIMARY,n_name  n_name  26      const   1       Using where; Using index
      # explain: 1    SIMPLE  customer        ref     PRIMARY,i_c_nationkey   i_c_nationkey   5       dbt3sf1.nation.n_nationkey      3145    Using index
      # explain: 1    SIMPLE  orders  ref     i_o_custkey     i_o_custkey     5       dbt3sf1.customer.c_custkey      7       Using index

      Should we keep "explain:" or introduce "analyze:" ?

      Attachments

        Issue Links

          Activity

            People

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