databend icon indicating copy to clipboard operation
databend copied to clipboard

Feature: support index for join performance optimization

Open zhang2014 opened this issue 3 years ago • 0 comments

Summary In ClickHouse, users can speed up the join query by create join engine: https://clickhouse.com/docs/en/engines/table-engines/special/join

In firebolt, users can speed up the join query by creating a join index: https://docs.firebolt.io/using-indexes/index-quick-reference.html#join-indexes

Details of ideas in databend:

  • When writing data, create hash table for each insert and persist it
  • The drive hash table is built in parallel through the index when join.
  • When two tables join, the table with index is preferred as the driver table. The table with more data is selected as the driver table when both tables have indexes.

zhang2014 avatar Sep 19 '22 08:09 zhang2014