Skip to content

[optimization] Optimize hash table build #5300

Description

@stdpain

Describe
In the original logic, Hashtable uses a vector-like structure to store actual data. When constructing the hash table, there may be about a quarter of the time copying data continuously. Especially in the case of building more columns, it will take more time. So I changed this to a raw pointer to avoid extra copy overhead. There will be good results in the hash table construction phase

Here is my test case, LINE_ORDER and LINE_ORDER_V2 is from SSB datasets:

SELECT count(*) FROM LINE_ORDER t1 join LINE_ORDER_V2 t2 WHERE t1.LO_ORDERKEY=t2.LO_ORDERKEY;
TypeRight Table RowsBuild TimeProbe TimeTime Cost (s)
After6001215658.288ms1s451ms4.07
Before60012151s428ms1s512ms4.69

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions