KeeProMise commented on PR #49852:
URL: https://github.com/apache/doris/pull/49852#issuecomment-2903801708

   > Here you can get help to reduce the partitions of materialized views.
   > 
   > 
https://doris.apache.org/zh-CN/docs/dev/query-acceleration/materialized-view/async-materialized-view/functions-and-demands#%E5%88%86%E5%8C%BA%E9%85%8D%E7%BD%AE
   > 
   > ```
   > CREATE MATERIALIZED VIEW mv1
   > BUILD DEFERRED REFRESH AUTO ON MANUAL
   > partition by(`k2`)
   > DISTRIBUTED BY RANDOM BUCKETS 2
   > PROPERTIES (
   > 'partition_sync_limit'='1',
   > 'partition_sync_time_unit'='DAY'
   > )
   > AS
   > SELECT * FROM t1;
   > ```
   
   Hi @zddr Thank you for your comment.   This feature 
(https://doris.apache.org/zh-CN/docs/dev/query-acceleration/materialized-view/async-materialized-view/functions-and-demands#%E5%88%86%E5%8C%BA%E9%85%8D%E7%BD%AE)
 indeed allows users to focus only on the partitions they need, such as the 
most recent 1 day, 1 week, or 1 month. However, it is still somewhat different 
from what we need. We need to obtain all the partitions that are included in 
the query conditions. For example, if the query condition is dt >= 20250501, 
then it should include all partitions from 20250501 to today, but not the 
partitions before 20250501. If I use the function you mentioned, I can set it 
to include only the partitions from the most recent month. But when it comes to 
20250602, I would actually lose the data from 20250501.
   Moreover, I understand that the function you mentioned only applies to 
partitions by dt. Suppose my partitions are based on city, and the query 
condition is city in (guangzhou, shenzhen), then my materialized view should 
only include data for guangzhou and shenzhen.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to