Skip to content

Join probe time includes the time of sending result to channel and getting avaliable empty chunk, which makes the probe time distorted #52222

Closed
@windtalker

Description

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

In explain analyze, if a here is join operator, it will record probe_time which indicates how much times does the probe process takes.

build_hash_table:{total:4.64s, fetch:4.64s, build:0s}, probe:{concurrency:5, total:1m49.5s, max:21.9s, probe:18.9s, fetch:1m30.6s}

However, this probe time actually includes the time of sending results to channel and getting avaliable emtpy chunk

tidb/pkg/executor/join.go

Lines 1074 to 1080 in 8d9e67b

if joinResult.chk.IsFull() {
w.hashJoinCtx.joinResultCh <- joinResult
ok, joinResult = w.getNewJoinResult()
if !ok {
return false, joinResult
}
}

So if the parent operator of join is slow(like high cardinality aggregation), the probe time will be very high, which is distorted and misleading.

2. What did you expect to see? (Required)

3. What did you see instead (Required)

4. What is your TiDB version? (Required)

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions