trino
trino copied to clipboard
Add preferred timeout for small dynamic filters
Description
Add a CBO rule to estimate if dynamic filter is worth waiting for. Focus on small tables that are most often used as dimension tables and nodes that generate small number of distinct values.
Rule DeterminePreferredDynamicFilterTimeout could allow us to remove 20s forced wait time for every possible DF in JDBC connectors if table presents the least row count statistic.
Query | Baseline duration[s] | PR duration[s] |
---|---|---|
tpcds/q59 | 12.10 | 4.55 |
tpcds/q02 | 9.63 | 3.47 |
tpcds/q36 | 5.82 | 2.60 |
tpcds/q53 | 8.04 | 4.80 |
tpcds/q13 | 7.7 | 5.1 |
Additional context and related issues
Release notes
( ) This is not user-visible or is docs only, and no release notes are required. ( ) Release notes are required. Please propose a release note for me. (X) Release notes are required, with the following suggested text:
# General
* Improve performance of queries with selective joins. ({issue}`22527`)