-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[Feat](Nereids) Support use mv hint #45855
Conversation
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
run buildall |
TPC-H: Total hot run time: 40176 ms
|
TPC-DS: Total hot run time: 191442 ms
|
ClickBench: Total hot run time: 33.65 s
|
ba21a85
to
1d16c55
Compare
run buildall |
TPC-H: Total hot run time: 32428 ms
|
TPC-DS: Total hot run time: 196772 ms
|
ClickBench: Total hot run time: 31.39 s
|
} | ||
explain { | ||
sql """select /*+ use_mv(mv3, mv1) */ c1 from t1""" | ||
contains("Used: use_mv([mv3].[mv1] )") |
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.
should add mv_rewrite_success
in Suite.groovy to check if use mv or not
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.
replace by explain memo plan
explain { | ||
sql """select /*+ no_use_mv(mv1, mv3) */ c1 from t1""" | ||
contains("Used: no_use_mv([mv1].[mv3] )") | ||
notContains("internal.test_cbo_use_mv.mv3") |
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.
notContains should use mv_not_part_in
in Suite.groovy
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.
replace by explain memo plan
|
||
sql """use ${db};""" | ||
explain { | ||
sql """select /*+ use_mv(mv1)*/ * from t1;""" |
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.
Maybe we should add three part names for async materialized view and for part names for sync materialized view test
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.
done
List<MaterializationContext> hintMTMVs = new ArrayList<>(); | ||
if (useMvHint.isAllMv()) { | ||
useMvHint.setStatus(Hint.HintStatus.SUCCESS); | ||
return hintMTMVs; |
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.
this means no mv can be written?
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.
yes
run buildall |
TPC-H: Total hot run time: 32769 ms
|
TPC-DS: Total hot run time: 190591 ms
|
ClickBench: Total hot run time: 31.43 s
|
run buildall |
TPC-H: Total hot run time: 32375 ms
|
TPC-DS: Total hot run time: 196586 ms
|
ClickBench: Total hot run time: 32.13 s
|
run p0 |
run buildall |
TPC-H: Total hot run time: 32778 ms
|
TPC-DS: Total hot run time: 195973 ms
|
ClickBench: Total hot run time: 31.23 s
|
run buildall |
TPC-H: Total hot run time: 32797 ms
|
TPC-DS: Total hot run time: 196907 ms
|
ClickBench: Total hot run time: 31.55 s
|
PR approved by anyone and no changes requested. |
PR approved by at least one committer and no changes requested. |
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
support use_mv and no_use_mv hint to control mv chose strategy in cbo
explain select /*+ use_mv(mv1)*/ * from t1;
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)