Skip to content

The execution time of join in explain analyze is not correct #5412

@SeaRise

Description

@SeaRise

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

origin_img_v2_698c973a-e685-4149-8fe8-55020c16f8ag

From

auto all_join_id_it = dag_context.getExecutorIdToJoinIdMap().find(executor_id);
if (all_join_id_it != dag_context.getExecutorIdToJoinIdMap().end())
{
for (const auto & join_executor_id : all_join_id_it->second)
{
auto it = dag_context.getJoinExecuteInfoMap().find(join_executor_id);
if (it != dag_context.getJoinExecuteInfoMap().end())
{
auto build_side_it = dag_context.getProfileStreamsMap().find(it->second.build_side_root_executor_id);
if (build_side_it != dag_context.getProfileStreamsMap().end())
{
UInt64 process_time_for_build = 0;
for (const auto & join_build_stream : build_side_it->second)
{
if (auto * p_stream = dynamic_cast<IProfilingBlockInputStream *>(join_build_stream.get()))
process_time_for_build = std::max(process_time_for_build, p_stream->getProfileInfo().execution_time);
}
current.time_processed_ns += process_time_for_build;
}
}
}
}
, we should add the execution time of HashJoinBuildBlockInputStream instead of streams of build_side_root_executor_id

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

3. What did you see instead (Required)

4. What is your TiFlash version? (Required)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions