You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In TiFlash, the output schema of join is [left_columns, right_columns], for example
select a.id from a join b on a.id = b.id and a.id1 = b.id1 and a.id2 = b.id2 and a.id3 = b.id3
The output schema of join is [a.id, a.id1, a.id2, a.id3, b.id, b.id1, b.id2, b.id3]
However, only a.id is actually needed. And inside join, the cost of combine the left columns with the right columns is actually very high: for left columns, it need to call replicateRange, and for right columns, it need to be added row by row using AddFound, if we can only return the column used by the parent operators, it will avoid some meaningless cost and increase the performance of join.
The text was updated successfully, but these errors were encountered:
windtalker
changed the title
Join only construct joined rows that is needed by its parent operator
Join only construct joined columns that is needed by its parent operator
Nov 2, 2023
Enhancement
In TiFlash, the output schema of join is [left_columns, right_columns], for example
The output schema of join is [a.id, a.id1, a.id2, a.id3, b.id, b.id1, b.id2, b.id3]
However, only
a.id
is actually needed. And inside join, the cost of combine the left columns with the right columns is actually very high: for left columns, it need to callreplicateRange
, and for right columns, it need to be added row by row usingAddFound
, if we can only return the column used by the parent operators, it will avoid some meaningless cost and increase the performance of join.The text was updated successfully, but these errors were encountered: