-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[improvement](mtmv) Support to use view when create mtmv #38882
base: master
Are you sure you want to change the base?
Conversation
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
run buildall |
TPC-H: Total hot run time: 41386 ms
|
TPC-DS: Total hot run time: 168523 ms
|
ClickBench: Total hot run time: 30.15 s
|
4048886
to
9e2969a
Compare
run buildall |
run buildall |
TPC-H: Total hot run time: 41413 ms
|
TPC-DS: Total hot run time: 168830 ms
|
ClickBench: Total hot run time: 30.45 s
|
run buildall |
TPC-H: Total hot run time: 41677 ms
|
TPC-DS: Total hot run time: 168155 ms
|
ClickBench: Total hot run time: 29.87 s
|
83a5c59
to
8d87283
Compare
run buildall |
TPC-H: Total hot run time: 39571 ms
|
TPC-H: Total hot run time: 39419 ms
|
TPC-DS: Total hot run time: 204186 ms
|
ClickBench: Total hot run time: 30.7 s
|
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
|
if view in mtmv, we always expand the view in analyze. So when query rewrite by materialized view or refresh the materialized view, the view doesn't exist. |
0342422
to
616758f
Compare
616758f
to
6952e6e
Compare
run buildall |
TPC-H: Total hot run time: 38072 ms
|
TPC-DS: Total hot run time: 193380 ms
|
ClickBench: Total hot run time: 31.83 s
|
run buildall |
TPC-H: Total hot run time: 38732 ms
|
TPC-DS: Total hot run time: 188480 ms
|
ClickBench: Total hot run time: 32.29 s
|
@@ -83,21 +81,30 @@ public static MTMVRelation generateMTMVRelation(MTMV mtmv, ConnectContext ctx) { | |||
} | |||
|
|||
public static MTMVRelation generateMTMVRelation(Plan plan) { | |||
return new MTMVRelation(getBaseTables(plan, true), getBaseTables(plan, false), getBaseViews(plan)); | |||
return new MTMVRelation(getBaseTables(plan, true, true), | |||
getBaseTables(plan, false, false), getBaseViews(plan)); |
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 explandView?otherwise,data change in baseTable,mv will not refresh auto
@@ -78,7 +78,8 @@ public void initMaterializationContext(CascadesContext cascadesContext) { | |||
* @param cascadesContext current cascadesContext in the planner | |||
*/ | |||
protected void doInitMaterializationContext(CascadesContext cascadesContext) { | |||
TableCollectorContext collectorContext = new TableCollectorContext(Sets.newHashSet(), true); | |||
TableCollectorContext collectorContext = new TableCollectorContext(Sets.newHashSet(), | |||
true, true); |
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.
ditto
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.
For query plan, this should not extend, we only get avalible mvs by one level table or view. this is for performance
61faf87
to
07d98d7
Compare
run buildall |
Proposed changes
Support to use mv when create async materialized view
Such as view def is as following:
Can create materialized view like following: