-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[opt](mtmv) Optimize explain materialized view rewrite info #49256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
TPC-H: Total hot run time: 32547 ms |
TPC-DS: Total hot run time: 185390 ms |
ClickBench: Total hot run time: 31.51 s |
9484268 to
1e702b1
Compare
|
run buildall |
TPC-H: Total hot run time: 34297 ms |
TPC-DS: Total hot run time: 193342 ms |
ClickBench: Total hot run time: 31 s |
|
run buildall |
TPC-H: Total hot run time: 33820 ms |
TPC-DS: Total hot run time: 191394 ms |
ClickBench: Total hot run time: 29.13 s |
a6711c6 to
676cad2
Compare
| .append(generateIdentifierName(materializationQualifier)).append(" chose, \n")); | ||
| } else { | ||
| builder.append(" chose: none, \n"); | ||
| .append(generateIdentifierName(materializationQualifier)).append(" chose \n")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not " chose\n"
|
run buildall |
TPC-H: Total hot run time: 33905 ms |
TPC-DS: Total hot run time: 185336 ms |
ClickBench: Total hot run time: 28.91 s |
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
ca191c2 to
6424684
Compare
|
run buildall |
TPC-H: Total hot run time: 34135 ms |
TPC-DS: Total hot run time: 187272 ms |
ClickBench: Total hot run time: 33.05 s |
FE UT Coverage ReportIncrement line coverage |
|
run check_coverage |
…9256) ### What problem does this PR solve? Optimize explain info is as following | | ========== MATERIALIZATIONS ========== | | MaterializedView | MaterializedViewRewriteSuccessAndChose: | internal.regression_test_nereids_rules_p0_mv_availability.partition_mv3 chose | | MaterializedViewRewriteSuccessButNotChose: | internal.regression_test_nereids_rules_p0_mv_availability.partition_mv4 not chose | internal.regression_test_nereids_rules_p0_mv_availability.partition_mv2 not chose | | MaterializedViewRewriteFail: | internal.regression_test_nereids_rules_p0_mv_availability.partition_mv1 fail | FailInfo: View struct info is invalid, Predicate compensate fail | internal.regression_test_nereids_rules_p0_mv_availability.partition_mv fail | FailInfo: View struct info is invalid | | | ========== STATISTICS ========== | planed with unknown column statistics +------------------------------------------------------------------------------------- 58 rows in set (0.06 sec) Optimize explain memo plan info is as following: | ========== MATERIALIZATIONS ========== | | | | MaterializedView | | MaterializedViewRewriteSuccessAndChose: | | internal.regression_test_nereids_rules_p0_mv_availability.partition_mv3 chose | | | | MaterializedViewRewriteSuccessButNotChose: | | internal.regression_test_nereids_rules_p0_mv_availability.partition_mv4 not chose | | internal.regression_test_nereids_rules_p0_mv_availability.partition_mv2 not chose | | | | MaterializedViewRewriteFail: | | internal.regression_test_nereids_rules_p0_mv_availability.partition_mv1 fail | | FailInfo: View struct info is invalid:view plan is LogicalResultSink[225] ( outputExprs=[l_shipdate#10, o_orderdate#20, l_partkey#1, l_suppkey#2, sum_total#25] ) | | +--LogicalAggregate[223] ( groupByExpr=[l_shipdate#10, o_orderdate#20, l_partkey#1, l_suppkey#2], outputExpr=[l_shipdate#10, o_orderdate#20, l_partkey#1, l_suppkey#2, sum(o_totalprice#19) AS `sum_total`apache#25], hasRepeat=false ) | | +--LogicalProject[221] ( distinct=false, projects=[l_shipdate#10, o_orderdate#20, l_partkey#1, l_suppkey#2, o_totalprice#19] ) | | +--LogicalJoin[219] ( type=LEFT_OUTER_JOIN, markJoinSlotReference=Optional.empty, hashJoinConjuncts=[(l_orderkey#0 = o_orderkey#16), (l_shipdate#10 = o_orderdate#20)], otherJoinConjuncts=[], markJoinConjuncts=[] ) | | |--LogicalProject[212] ( distinct=false, projects=[l_orderkey#0, l_partkey#1, l_suppkey#2, l_shipdate#10] ) | | | +--LogicalFilter[210] ( predicates=(l_orderkey#0 = 1) ) | | | +--LogicalOlapScan ( qualified=internal.regression_test_nereids_rules_p0_mv_availability.lineitem_partition, indexName=<index_not_selected>, selectedIndexId=1749786446788, preAgg=ON, operativeCol=[l_orderkey#0, l_partkey#1, l_suppkey#2, l_shipdate#10] ) | | +--LogicalProject[216] ( distinct=false, projects=[o_orderkey#16, o_totalprice#19, o_orderdate#20] ) | | +--LogicalFilter[214] ( predicates=(o_orderkey#16 = 1) ) | | +--LogicalOlapScan ( qualified=internal.regression_test_nereids_rules_p0_mv_availability.orders_partition, indexName=<index_not_selected>, selectedIndexId=1749786446763, preAgg=ON, operativeCol=[o_orderkey#16, o_totalprice#19, o_orderdate#20] ), Predicate compensate fail:query predicates = Predicates ( pulledUpPredicates=[] ), | | query equivalenceClass = EquivalenceClass{equivalenceSlotMap={}}, | | view predicates = Predicates ( pulledUpPredicates=[] ), | | query equivalenceClass = EquivalenceClass{equivalenceSlotMap={}} | | comparisonResult = valid: true | | viewExpressions: [(l_orderkey#0 = 1)] | | queryExpressions :[] | | viewNoNullableSlot :[] | | queryAllPulledUpExpressions :[] | | | | internal.regression_test_nereids_rules_p0_mv_availability.partition_mv fail | | FailInfo: View struct info is invalid:view plan is LogicalResultSink[93] ( outputExprs=[l_shipdate#10, o_orderdate#20, l_partkey#1, l_suppkey#2, sum_total#25] ) | | +--LogicalAggregate[91] ( groupByExpr=[l_shipdate#10, o_orderdate#20, l_partkey#1, l_suppkey#2], outputExpr=[l_shipdate#10, o_orderdate#20, l_partkey#1, l_suppkey#2, sum(o_totalprice#19) AS `sum_total`apache#25], hasRepeat=false ) | | +--LogicalProject[89] ( distinct=false, projects=[l_shipdate#10, o_orderdate#20, l_partkey#1, l_suppkey#2, o_totalprice#19] ) | | +--LogicalJoin[87] ( type=LEFT_OUTER_JOIN, markJoinSlotReference=Optional.empty, hashJoinConjuncts=[(l_orderkey#0 = o_orderkey#16), (l_shipdate#10 = o_orderdate#20)], otherJoinConjuncts=[], markJoinConjuncts=[] ) | | |--LogicalProject[83] ( distinct=false, projects=[l_orderkey#0, l_partkey#1, l_suppkey#2, l_shipdate#10] ) | | | +--LogicalOlapScan ( qualified=internal.regression_test_nereids_rules_p0_mv_availability.lineitem_partition, indexName=<index_not_selected>, selectedIndexId=1749786446788, preAgg=ON, operativeCol=[l_orderkey#0, l_partkey#1, l_suppkey#2, l_shipdate#10] ) | | +--LogicalProject[84] ( distinct=false, projects=[o_orderkey#16, o_totalprice#19, o_orderdate#20] ) | | +--LogicalOlapScan ( qualified=internal.regression_test_nereids_rules_p0_mv_availability.orders_partition, indexName=<index_not_selected>, selectedIndexId=1749786446763, preAgg=ON, operativeCol=[o_orderkey#16, o_totalprice#19, o_orderdate#20] ) | +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 535 rows in set (0.07 sec)
…9256) ### What problem does this PR solve? Optimize explain info is as following | | ========== MATERIALIZATIONS ========== | | MaterializedView | MaterializedViewRewriteSuccessAndChose: | internal.regression_test_nereids_rules_p0_mv_availability.partition_mv3 chose | | MaterializedViewRewriteSuccessButNotChose: | internal.regression_test_nereids_rules_p0_mv_availability.partition_mv4 not chose | internal.regression_test_nereids_rules_p0_mv_availability.partition_mv2 not chose | | MaterializedViewRewriteFail: | internal.regression_test_nereids_rules_p0_mv_availability.partition_mv1 fail | FailInfo: View struct info is invalid, Predicate compensate fail | internal.regression_test_nereids_rules_p0_mv_availability.partition_mv fail | FailInfo: View struct info is invalid | | | ========== STATISTICS ========== | planed with unknown column statistics +------------------------------------------------------------------------------------- 58 rows in set (0.06 sec) Optimize explain memo plan info is as following: | ========== MATERIALIZATIONS ========== | | | | MaterializedView | | MaterializedViewRewriteSuccessAndChose: | | internal.regression_test_nereids_rules_p0_mv_availability.partition_mv3 chose | | | | MaterializedViewRewriteSuccessButNotChose: | | internal.regression_test_nereids_rules_p0_mv_availability.partition_mv4 not chose | | internal.regression_test_nereids_rules_p0_mv_availability.partition_mv2 not chose | | | | MaterializedViewRewriteFail: | | internal.regression_test_nereids_rules_p0_mv_availability.partition_mv1 fail | | FailInfo: View struct info is invalid:view plan is LogicalResultSink[225] ( outputExprs=[l_shipdate#10, o_orderdate#20, l_partkey#1, l_suppkey#2, sum_total#25] ) | | +--LogicalAggregate[223] ( groupByExpr=[l_shipdate#10, o_orderdate#20, l_partkey#1, l_suppkey#2], outputExpr=[l_shipdate#10, o_orderdate#20, l_partkey#1, l_suppkey#2, sum(o_totalprice#19) AS `sum_total`apache#25], hasRepeat=false ) | | +--LogicalProject[221] ( distinct=false, projects=[l_shipdate#10, o_orderdate#20, l_partkey#1, l_suppkey#2, o_totalprice#19] ) | | +--LogicalJoin[219] ( type=LEFT_OUTER_JOIN, markJoinSlotReference=Optional.empty, hashJoinConjuncts=[(l_orderkey#0 = o_orderkey#16), (l_shipdate#10 = o_orderdate#20)], otherJoinConjuncts=[], markJoinConjuncts=[] ) | | |--LogicalProject[212] ( distinct=false, projects=[l_orderkey#0, l_partkey#1, l_suppkey#2, l_shipdate#10] ) | | | +--LogicalFilter[210] ( predicates=(l_orderkey#0 = 1) ) | | | +--LogicalOlapScan ( qualified=internal.regression_test_nereids_rules_p0_mv_availability.lineitem_partition, indexName=<index_not_selected>, selectedIndexId=1749786446788, preAgg=ON, operativeCol=[l_orderkey#0, l_partkey#1, l_suppkey#2, l_shipdate#10] ) | | +--LogicalProject[216] ( distinct=false, projects=[o_orderkey#16, o_totalprice#19, o_orderdate#20] ) | | +--LogicalFilter[214] ( predicates=(o_orderkey#16 = 1) ) | | +--LogicalOlapScan ( qualified=internal.regression_test_nereids_rules_p0_mv_availability.orders_partition, indexName=<index_not_selected>, selectedIndexId=1749786446763, preAgg=ON, operativeCol=[o_orderkey#16, o_totalprice#19, o_orderdate#20] ), Predicate compensate fail:query predicates = Predicates ( pulledUpPredicates=[] ), | | query equivalenceClass = EquivalenceClass{equivalenceSlotMap={}}, | | view predicates = Predicates ( pulledUpPredicates=[] ), | | query equivalenceClass = EquivalenceClass{equivalenceSlotMap={}} | | comparisonResult = valid: true | | viewExpressions: [(l_orderkey#0 = 1)] | | queryExpressions :[] | | viewNoNullableSlot :[] | | queryAllPulledUpExpressions :[] | | | | internal.regression_test_nereids_rules_p0_mv_availability.partition_mv fail | | FailInfo: View struct info is invalid:view plan is LogicalResultSink[93] ( outputExprs=[l_shipdate#10, o_orderdate#20, l_partkey#1, l_suppkey#2, sum_total#25] ) | | +--LogicalAggregate[91] ( groupByExpr=[l_shipdate#10, o_orderdate#20, l_partkey#1, l_suppkey#2], outputExpr=[l_shipdate#10, o_orderdate#20, l_partkey#1, l_suppkey#2, sum(o_totalprice#19) AS `sum_total`apache#25], hasRepeat=false ) | | +--LogicalProject[89] ( distinct=false, projects=[l_shipdate#10, o_orderdate#20, l_partkey#1, l_suppkey#2, o_totalprice#19] ) | | +--LogicalJoin[87] ( type=LEFT_OUTER_JOIN, markJoinSlotReference=Optional.empty, hashJoinConjuncts=[(l_orderkey#0 = o_orderkey#16), (l_shipdate#10 = o_orderdate#20)], otherJoinConjuncts=[], markJoinConjuncts=[] ) | | |--LogicalProject[83] ( distinct=false, projects=[l_orderkey#0, l_partkey#1, l_suppkey#2, l_shipdate#10] ) | | | +--LogicalOlapScan ( qualified=internal.regression_test_nereids_rules_p0_mv_availability.lineitem_partition, indexName=<index_not_selected>, selectedIndexId=1749786446788, preAgg=ON, operativeCol=[l_orderkey#0, l_partkey#1, l_suppkey#2, l_shipdate#10] ) | | +--LogicalProject[84] ( distinct=false, projects=[o_orderkey#16, o_totalprice#19, o_orderdate#20] ) | | +--LogicalOlapScan ( qualified=internal.regression_test_nereids_rules_p0_mv_availability.orders_partition, indexName=<index_not_selected>, selectedIndexId=1749786446763, preAgg=ON, operativeCol=[o_orderkey#16, o_totalprice#19, o_orderdate#20] ) | +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 535 rows in set (0.07 sec)
What problem does this PR solve?
Optimize explain info is as following
Optimize explain memo plan info is as following:
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)