You need to enable JavaScript to run this app.
导航
Explain Analyze字段说明
最近更新时间:2024.06.28 11:59:38首次发布时间:2024.06.28 11:59:38

Text形式

│ Segment[0]                                                                                          │
│    Output Exchange: Output                                                                          │
│    Parallel Size: 1, Cluster Name: test_shard_localhost, Exchange Parallel Size: 1                  │
│    Output Columns: [a, t2.b]                                                                        │
│       Gather Exchange segment[1] Est. ? rows                                                        │
│                                                                                                     │
│ Segment[1]                                                                                          │
│    Output Exchange: GATHER                                                                          │
│    Parallel Size: 1, Cluster Name: test_shard_localhost, Exchange Parallel Size: 1                  │
│    Outputs: [( SegmentID:0 PlanSegmentType:EXCHANGE ParallelSize:1 ShuffleFunctionName:cityHash64)] │
│    Output Columns: [a, t2.b]                                                                        │
│       Projection Est. ? rows                                                                        │
│       │     Expressions: a:=a_1, t2.b:=b_2                                                          │
│       └─ Inner Join Est. ? rows                                                                     │
│          │     Condition: a_1 == a_2                                                                │
│          ├─ Buffer Est. ? rows                                                                      │
│          │  └─ CTERef[0] <-- segment[2] Est. ? rows                                                 │
│          └─ Buffer Est. ? rows                                                                      │
│             └─ CTERef[0] <-- segment[2] Est. ? rows                                                 │
│                                                                                                     │
│ Segment[2]                                                                                          │
│    Output Exchange: REPARTITION[a, a]                                                               │
│    Parallel Size: 1, Cluster Name: test_shard_localhost, Exchange Parallel Size: 1                  │
│    Outputs: [( SegmentID:1 PlanSegmentType:EXCHANGE ParallelSize:1 ShuffleFunctionName:cityHash64)  │
│              ( SegmentID:1 PlanSegmentType:EXCHANGE ParallelSize:1 ShuffleFunctionName:cityHash64)] │
│    Output Columns: [a, b]                                                                           │
│       TableScan test.t48028 Est. ? rows                                                             │
│             Outputs: [a, b]                                                                         │
│
  • Output Exchange: 当前segment输出数据的方式,代表当前segment的数据以什么样的形式传输给下一个segment,分别有Output、LOCAL_NO_NEED_REPARTITION、LOCAL_MAY_NEED_REPARTITION、BROADCAST、REPARTITION、GATHER、UNKNOWN。为Repartition时,后面中括号会显示shuffle keys
  • Output Columns: segment输出的列名
  • Outputs: 当前segment结果输出到下一个segment信息
  • Parallel size:当前segment的并行度
  • Cluster Name: 集群名
  • Exchange Parallel Size : Exchange并行size
  • Est. : 估计信息,根据统计信息估算的行数和cost
  • Act. :实际执行信息,output :输出行数,数据大小,wait time输出数据时等待时间,Wall Time :所有算子的elapsed时间。 Input :输入行数,数据大小,wait time输入数据时等待时间
  • QError: 算子实际输出的行数和根据统计信息估算的行数的比值
  • Filtered:(最大输入行数 - 输出行数)/最大输入行数

Where和Condition均是过滤条件

Json形式

json形式去掉了统计信息内容

{
 "DistributedPlan" : [
  {
   "SegmentID" : 2,
   "OutputExchangeMode" : "REPARTITION",
   "ShuffleKeys" : "REPARTITION",
   "ParallelSize" : 1,
   "ClusterName" : "test_shard_localhost",
   "ExchangeParallelSize" : 1,
   "OutputColumns" : [
    "a",
    "b"
   ],
   "Outputs" : [
    {
     "SegmentID" : 1,
     "PlanSegmentType" : "EXCHANGE",
     "ParallelSize" : 1,
     "ShuffleFunctionName" : "cityHash64"
    },
    {
     "SegmentID" : 1,
     "PlanSegmentType" : "EXCHANGE",
     "ParallelSize" : 1,
     "ShuffleFunctionName" : "cityHash64"
    }
   ],
   "QueryPlan" : {
    "NodeId" : 58,
    "NodeType" : "TableScan",
    "Outputs" : [
     "b",
     "a"
    ],
    "Profiles" : {
     "WallTimeMs" : 1,
     "OutputRows" : 3,
     "OutputBytes" : 24,
     "OutputWaitTimeMs" : 0,
     "Inputs" : [
      {
       "InputNodeId" : -1,
       "InputRows" : 0,
       "InputBytes" : 0,
       "InputWaitTimeMs" : 4
      }
     ],
     "FilteredRate" : 0
    }
   }
  },
  {
   "SegmentID" : 1,
   "OutputExchangeMode" : "GATHER",
   "ParallelSize" : 1,
   "ClusterName" : "test_shard_localhost",
   "ExchangeParallelSize" : 1,
   "OutputColumns" : [
    "a_1",
    "a_2",
    "b_2"
   ],
   "Outputs" : [
    {
     "SegmentID" : 0,
     "PlanSegmentType" : "EXCHANGE",
     "ParallelSize" : 1,
     "ShuffleFunctionName" : "cityHash64"
    }
   ],
   "QueryPlan" : {
    "NodeId" : 69,
    "NodeType" : "Join",
    "Strictness" : "",
    "JoinKind" : "Inner",
    "Condition" : [
     "a_1 == a_2"
    ],
    "Profiles" : {
     "WallTimeMs" : 1,
     "OutputRows" : 3,
     "OutputBytes" : 36,
     "OutputWaitTimeMs" : 0,
     "Inputs" : [
      {
       "InputNodeId" : 72,
       "InputRows" : 3,
       "InputBytes" : 12,
       "InputWaitTimeMs" : 75
      },
      {
       "InputNodeId" : 73,
       "InputRows" : 3,
       "InputBytes" : 24,
       "InputWaitTimeMs" : 72
      }
     ],
     "FilteredRate" : 0
    },
    "Children" : [
     {
      "NodeId" : 72,
      "NodeType" : "Buffer",
      "Profiles" : {
       "WallTimeMs" : 0,
       "OutputRows" : 3,
       "OutputBytes" : 12,
       "OutputWaitTimeMs" : 40,
       "Inputs" : [
        {
         "InputNodeId" : 75,
         "InputRows" : 3,
         "InputBytes" : 12,
         "InputWaitTimeMs" : 86
        }
       ],
       "FilteredRate" : 0
      },
      "Children" : [
       {
        "NodeId" : 75,
        "NodeType" : "Projection",
        "Expressions" : [
         "a_1:=a"
        ],
        "Profiles" : {
         "WallTimeMs" : 0,
         "OutputRows" : 3,
         "OutputBytes" : 12,
         "OutputWaitTimeMs" : 0,
         "Inputs" : [
          {
           "InputNodeId" : 65,
           "InputRows" : 3,
           "InputBytes" : 24,
           "InputWaitTimeMs" : 89
          }
         ],
         "FilteredRate" : 0
        },
        "Children" : [
         {
          "NodeId" : 65,
          "NodeType" : "RemoteExchangeSource",
          "Segment[2]" : [
           "a",
           "b"
          ],
          "Profiles" : {
           "WallTimeMs" : 0,
           "OutputRows" : 3,
           "OutputBytes" : 24,
           "OutputWaitTimeMs" : 5,
           "Inputs" : [
            {
             "InputNodeId" : -1,
             "InputRows" : 0,
             "InputBytes" : 0,
             "InputWaitTimeMs" : 55
            }
           ],
           "FilteredRate" : 0
          }
         }
        ]
       }
      ]
     },
     {
      "NodeId" : 73,
      "NodeType" : "Buffer",
      "Profiles" : {
       "WallTimeMs" : 0,
       "OutputRows" : 3,
       "OutputBytes" : 24,
       "OutputWaitTimeMs" : 0,
       "Inputs" : [
        {
         "InputNodeId" : 76,
         "InputRows" : 3,
         "InputBytes" : 24,
         "InputWaitTimeMs" : 74
        }
       ],
       "FilteredRate" : 0
      },
      "Children" : [
       {
        "NodeId" : 76,
        "NodeType" : "Projection",
        "Expressions" : [
         "a_2:=a",
         "b_2:=b"
        ],
        "Profiles" : {
         "WallTimeMs" : 0,
         "OutputRows" : 3,
         "OutputBytes" : 24,
         "OutputWaitTimeMs" : 0,
         "Inputs" : [
          {
           "InputNodeId" : 68,
           "InputRows" : 3,
           "InputBytes" : 24,
           "InputWaitTimeMs" : 76
          }
         ],
         "FilteredRate" : 0
        },
        "Children" : [
         {
          "NodeId" : 68,
          "NodeType" : "RemoteExchangeSource",
          "Segment[2]" : [
           "a",
           "b"
          ],
          "Profiles" : {
           "WallTimeMs" : 0,
           "OutputRows" : 3,
           "OutputBytes" : 24,
           "OutputWaitTimeMs" : 5,
           "Inputs" : [
            {
             "InputNodeId" : -1,
             "InputRows" : 0,
             "InputBytes" : 0,
             "InputWaitTimeMs" : 40
            }
           ],
           "FilteredRate" : 0
          }
         }
        ]
       }
      ]
     }
    ]
   }
  },
  {
   "SegmentID" : 0,
   "OutputExchangeMode" : "Output",
   "ParallelSize" : 1,
   "ClusterName" : "test_shard_localhost",
   "ExchangeParallelSize" : 1,
   "OutputColumns" : [
    "Explain Analyze"
   ],
   "QueryPlan" : {
    "NodeId" : 71,
    "NodeType" : "Projection",
    "Expressions" : [
     "Explain Analyze"
    ],
    "Children" : [
     {
      "NodeId" : 74,
      "NodeType" : "ExplainAnalyze",
      "Profiles" : {
       "WallTimeMs" : 0,
       "OutputRows" : 3,
       "OutputBytes" : 36,
       "OutputWaitTimeMs" : 0,
       "Inputs" : [
        {
         "InputNodeId" : 70,
         "InputRows" : 3,
         "InputBytes" : 36,
         "InputWaitTimeMs" : 110
        }
       ],
       "FilteredRate" : 0
      },
      "Children" : [
       {
        "NodeId" : 70,
        "NodeType" : "RemoteExchangeSource",
        "Segment[1]" : [
         "a_1",
         "a_2",
         "b_2"
        ],
        "Profiles" : {
         "WallTimeMs" : 105,
         "OutputRows" : 3,
         "OutputBytes" : 36,
         "OutputWaitTimeMs" : 0,
         "Inputs" : [
          {
           "InputNodeId" : -1,
           "InputRows" : 0,
           "InputBytes" : 0,
           "InputWaitTimeMs" : 7
          }
         ],
         "FilteredRate" : 0
        }
       }
      ]
     }
    ]
   }
  }
 ]
}
  • NodeId : plan node的id
  • NodeType : plan node的类型
  • Profiles: Profile信息