What is "probe" in the execution info of the TiDB EXPLAIN ANALYZE execution plan?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: TiDB EXPLAIN ANALYZE执行计划中execution info中的probe是什么?

| username: FutureDB

In the execution plan obtained by TiDB through EXPLAIN ANALYZE, what does the probe in the execution info mean?
For example, in the execution info of the hashjoin operator:

time: 3m57.2s, loop:2, build_hash_table:{total:3m57.2s, fetch: 3m57.2s, build:80us},probe:{concurrency:5, total:19m45.8s,max:3m57.2s,probe:539.9us,fetch:19m45.8s}

There are two probes here, one outside the {} and one inside the {}. What do these two probes mean respectively?

| username: TiDBer_JUi6UvZm | Original post link

EXPLAIN ANALYZE | PingCAP 文档中心 Search for “probe” here and try to understand it yourself.

| username: TiDBer_JUi6UvZm | Original post link

  • probe: Execution information of join worker:
    • concurrency: Number of join workers.
    • total: Total execution time of all join workers.
    • max: Maximum execution time of a single join worker.
    • probe: Total time spent joining outer table rows with the hash table.
    • fetch: Total time join workers spend waiting to read outer table rows data.
| username: Jack-li | Original post link

  1. Probe outside the {}:
    This part describes the overall statistical information of the probe phase. Specifically, in the example you provided:
    • time: 3m57.2s indicates that the total time spent in the probe phase is approximately 3 minutes and 57.2 seconds.
    • concurrency: 5 indicates that 5 concurrent threads or tasks were used in the probe phase to perform the operation, which helps speed up data processing.
    • total: 19m45.8s is the total execution time of all concurrent tasks in the probe phase, i.e., the cumulative time for the 5 concurrent tasks to perform the probe operation.
    • max: 3m57.2s should refer to the maximum time taken by a single concurrent task for the probe operation.
| username: FutureDB | Original post link

Learned a lot, thank you!

| username: mono | Original post link

Read the official documentation more!

| username: shigp_TIDBER | Original post link

  • probe: The total time spent by the main thread of IndexJoin to join the outer table rows and the inner table rows using the hash table.