Skip to main content
Version: current [24.2.x]

Runtime Filtering

Runtime filtering improves query performance by dynamically applying dimension table filters to joined fact tables. By default, runtime filtering is enabled for partitioned columns and disabled for non-partitioned columns.

To enable runtime filtering for both partitioned and non-partitioned columns:

  • Enable both the planner.filter.runtime_filter and exec.non_partitioned_parquet.enable_runtime_filter support keys.

To disable runtime filtering for both partioned and non-partitioned columns:

  • Disable the planner.filter.runtime_filter support key.

Runtime Filtering Example

The following query joins multiple partitioned and non-partitioned columns:

  • Partitioned columns: ptcol1, ptcol2
  • Non-partitioned columns: regcol1, regcol2
Join partitioned and non-partitioned columns
select 
t1.ptcol1, t1.ptcol2,
t1.regcol1, t1.regcol2,
t1.regcol3,
t1.othcol, t2.t2col
from table1 t1 inner join table2 t2 on
(t1.ptcol1 = t2.ptcol1 and t1.ptcol2 = t2.ptcol2 and
t1.regcol1 = t2.regcol1 and t1.regcol2 = t2.regcol2)
where t1.regcol3 = "highly_selective_val";