Konstantin Orlov created IGNITE-24210:
-----------------------------------------

             Summary: Sql. Add support for disjunctive predicates in 
IgniteMultiJoinOptimizeBushyRule
                 Key: IGNITE-24210
                 URL: https://issues.apache.org/jira/browse/IGNITE-24210
             Project: Ignite
          Issue Type: Bug
          Components: sql
            Reporter: Konstantin Orlov


The \{{IgniteMultiJoinOptimizeBushyRule}} introduced in IGNITE-24167  excludes 
disjunctive predicates from consideration. The main reason is to get better 
plan for query #7 from TPC-H suite.

The cause of the problem resulting in a worse plan – underestimation of a 
result set returned by join node. Algorithm introduced in IGNITE-24167 takes an 
advantage of row count estimation improved in IGNITE-23968. But the latter 
lacks a handling of correlation in big join tries. For instance, in case of 
join {{{}a JOIN (b JOIN c ON (b.foo = 1 AND c.foo = 2 OR b.foo = 2 AND c.foo = 
1)) ON a.bar = b.bar{}}}, percentage used for computing final result set must 
be similar to percentage of relation `b`, instead of `percentage(b) * 
percentage(c)`.

We need to find better approach to handle such case.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to