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

r_total_time in ANALYZE FORMAT=JSON is not consistent

    XMLWordPrintable

Details

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

    Description

      While working on TODO-4513 it has been observed that sum "r_total_time_ms" of the parent select is greater than the sum of child nodes execution times. The server spends time somewhere else which is not displayed. See the example below:

      | {
        "query_block": {
          "select_id": 1,
          "r_loops": 1,
          "r_total_time_ms": 14050.902,
          "table": {
            "table_name": "LVS_Auftrag",
            "access_type": "ALL",
            "r_loops": 1,
            "rows": 502905,
            "r_rows": 502905,
            "r_table_time_ms": 145.552,
            "r_other_time_ms": 5534.96,
            "r_engine_stats": {
              "pages_accessed": 9427
            },
            "filtered": 99.21875,
            "r_filtered": 0,
            "attached_condition": "LVS_Auftrag.Stamp < '2024-04-04 11:53:36' and !<in_optimizer>(LVS_Auftrag.TeilID,LVS_Auftrag.TeilID in (subquery#3))"
          },
          "subqueries": [
            {
              "query_block": {
                "select_id": 3,
                "r_loops": 1,
                "r_total_time_ms": 1908.193,
                "table": {
                  "table_name": "LVS_AuftragImp",
                  "access_type": "index",
                  "possible_keys": ["TeilIDX"],
                  "key": "TeilIDX",
                  "key_length": "9",
                  "used_key_parts": ["TeilID"],
                  "r_loops": 1,
                  "rows": 502542,
                  "r_rows": 502542,
                  "r_table_time_ms": 80.454,
                  "r_other_time_ms": 1827.464,
                  "r_engine_stats": {
                    "pages_accessed": 1309
                  },
                  "filtered": 100,
                  "r_filtered": 100,
                  "using_index": true
                }
              }
            }
          ]
        }
      } |
      

      Attachments

        Activity

          People

            oleg.smirnov Oleg Smirnov
            oleg.smirnov Oleg Smirnov
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.