Uh oh!
There was an error while loading. Please reload this page.
[improvement](mtmv) Support to add use_for_rewrite property when create materialized view - #40332
Conversation
doris-robot
commented
Sep 3, 2024
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
seawinde
commented
Sep 3, 2024
run buildall |
1 similar comment
seawinde
commented
Sep 4, 2024
run buildall |
doris-robot
commented
Sep 4, 2024
TPC-H: Total hot run time: 37811 ms |
doris-robot
commented
Sep 4, 2024
TPC-DS: Total hot run time: 192352 ms |
doris-robot
commented
Sep 4, 2024
ClickBench: Total hot run time: 32.11 s |
morrySnow
commented
Sep 4, 2024
is_used_in_rewrite -> use_for_rewrite |
seawinde
commented
Sep 4, 2024
run buildall |
doris-robot
commented
Sep 4, 2024
TPC-H: Total hot run time: 38457 ms |
doris-robot
commented
Sep 4, 2024
TPC-DS: Total hot run time: 192909 ms |
doris-robot
commented
Sep 4, 2024
ClickBench: Total hot run time: 32.72 s |
| LOG.debug(String.format("mv doesn't part in query rewrite process because " | ||
| + "use_for_rewrite is false, mv is %s", | ||
| materializedView.getName())); |
There was a problem hiding this comment.
avoid use string format, use '{}' in message template to avoid new string object for every log even if not print it
44f9817 to
7e5124bCompareseawinde
commented
Sep 6, 2024
run buildall |
doris-robot
commented
Sep 6, 2024
TPC-H: Total hot run time: 38082 ms |
doris-robot
commented
Sep 6, 2024
TPC-DS: Total hot run time: 190022 ms |
doris-robot
commented
Sep 6, 2024
ClickBench: Total hot run time: 31.64 s |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
PR approved by anyone and no changes requested. |
seawinde
commented
Sep 9, 2024
run buildall |
doris-robot
commented
Sep 9, 2024
TPC-H: Total hot run time: 37715 ms |
doris-robot
commented
Sep 9, 2024
TPC-DS: Total hot run time: 192962 ms |
doris-robot
commented
Sep 9, 2024
ClickBench: Total hot run time: 31.45 s |
seawinde
commented
Sep 9, 2024
run buildall |
doris-robot
commented
Sep 9, 2024
TPC-H: Total hot run time: 37958 ms |
doris-robot
commented
Sep 9, 2024
TPC-DS: Total hot run time: 192217 ms |
doris-robot
commented
Sep 9, 2024
ClickBench: Total hot run time: 31.65 s |
seawinde
commented
Sep 11, 2024
run buildall |
doris-robot
commented
Sep 11, 2024
TPC-H: Total hot run time: 38201 ms |
doris-robot
commented
Sep 11, 2024
TPC-DS: Total hot run time: 198913 ms |
doris-robot
commented
Sep 11, 2024
ClickBench: Total hot run time: 32.07 s |
PR approved by at least one committer and no changes requested. |
…te materialized view (apache#40332) Add `is_used_in_rewrite` property when create mv. Default true; If `is_used_in_rewrite` is false which means the mv would not partion in query rewrite. Such as mv def is as following: CREATE MATERIALIZED VIEW mv1 BUILD IMMEDIATE REFRESH AUTO ON MANUAL DISTRIBUTED BY RANDOM BUCKETS 2 PROPERTIES ( 'replication_num' = '1', 'use_for_rewrite' = 'false' ) AS SELECT k1, k2, count(*) from t1 group by k1, k2; if we run query as following, this mv would not partition in the query rewrite: SELECT k2, count(*) from t1 group by k2;
…te materialized view (#40332) Add `is_used_in_rewrite` property when create mv. Default true; If `is_used_in_rewrite` is false which means the mv would not partion in query rewrite. Such as mv def is as following: CREATE MATERIALIZED VIEW mv1 BUILD IMMEDIATE REFRESH AUTO ON MANUAL DISTRIBUTED BY RANDOM BUCKETS 2 PROPERTIES ( 'replication_num' = '1', 'use_for_rewrite' = 'false' ) AS SELECT k1, k2, count(*) from t1 group by k1, k2; if we run query as following, this mv would not partition in the query rewrite: SELECT k2, count(*) from t1 group by k2;
…te materialized view (apache#40332) Add `is_used_in_rewrite` property when create mv. Default true; If `is_used_in_rewrite` is false which means the mv would not partion in query rewrite. Such as mv def is as following: CREATE MATERIALIZED VIEW mv1 BUILD IMMEDIATE REFRESH AUTO ON MANUAL DISTRIBUTED BY RANDOM BUCKETS 2 PROPERTIES ( 'replication_num' = '1', 'use_for_rewrite' = 'false' ) AS SELECT k1, k2, count(*) from t1 group by k1, k2; if we run query as following, this mv would not partition in the query rewrite: SELECT k2, count(*) from t1 group by k2;
Proposed changes
Add
use_for_rewriteproperty when create mv. Default true;If
use_for_rewriteis false which means the mv would not partion in query rewrite.Such as mv def is as following:
if we run query as following, this mv would not partition in the query rewrite: