-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
explain: reformat the explain info of hash joins #12985
Comments
An explain result example: Only the inner side is printed in the explain result. And the it's the default build side of hashjoin. HashLeftJoin_23 4166.67 root left outer join, inner:TableReader_33, equal:[eq(Column#2, Column#4)]
├─TableReader_33 3333.33 root data:TableScan_32
│ └─TableScan_32 3333.33 cop[tikv] table:t1, range:(1,+inf], keep order:false, stats:pseudo
└─TableReader_36 9990.00 root data:Selection_35
└─Selection_35 9990.00 cop[tikv] not(isnull(Column#4))
└─TableScan_34 10000.00 cop[tikv] table:t2, range:[-inf,+inf], keep order:false, stats:pseudo We can refine the explain result to: HashLeftJoin_23 4166.67 root left outer join, inner(build):TableReader_33, outer: TableReader_36, equal:[eq(Column#2, Column#4)]
├─TableReader_33 3333.33 root data:TableScan_32
│ └─TableScan_32 3333.33 cop[tikv] table:t1, range:(1,+inf], keep order:false, stats:pseudo
└─TableReader_36 9990.00 root data:Selection_35
└─Selection_35 9990.00 cop[tikv] not(isnull(Column#4))
└─TableScan_34 10000.00 cop[tikv] table:t2, range:[-inf,+inf], keep order:false, stats:pseudo |
And not only the explain result of HashJoin needs to mark both the outer and inner side. But also IndexJoin and MergeJoin. It will make the readers EASY and FAST to locate the two children of a join. |
Use |
I think
|
After pr/14838,
|
Feature Request
Is your feature request related to a problem? Please describe:
Related to the outer hash join issue #6868 and the index hash join #12139, #12349 .
The current explain info of hash joins cannot directly label which side builds a hash table. Instead, it just outputs the inner side.
For example:
T (left/right outer) join S on T.a=S.a
(1) if T is not larger than S, so T builds a hash table
inner: T
(2) otherwise:
inner: S
Describe the feature you'd like:
Clearly output the internal information of (index) hash joins:
For example:
T (left/right outer) join S on T.a=S.a
(1) if T is not larger than S, so T builds a hash table
inner (build): T, outer: S
(2) otherwise:
inner: T, outer (build): S
Describe alternatives you've considered:
if you have suggestions, pleas write it here.
Teachability, Documentation, Adoption, Migration Strategy:
The text was updated successfully, but these errors were encountered: