trino icon indicating copy to clipboard operation
trino copied to clipboard

Use SortedPositionLink for BETWEEN joins

Open sopel39 opened this issue 2 years ago • 5 comments

Currently, we use inequality joins only for expressions like probe_symbol < build_symbol AND probe_symbol + 1 > build_symbol, but we don't inequality join for probe_symbol <> build_symbol. Affected queries:

tpch/q21
tpcds/q16
tpcds/q19
tpcds/q46
tpcds/q64
tpcds/q68
tpcds/q94
tpcds/q95

It would be great to know how big build side per hash entry in these joins in order to determine if such optimization makes sense. cc @skrzypo987 @lukasz-stec

sopel39 avatar Apr 22 '22 11:04 sopel39