Dong-GuoSheng opened a new issue, #47850: URL: https://github.com/apache/doris/issues/47850
### Search before asking - [x] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues. ### Description 我有一个表,按天或按周分区,每天数百亿数据,有近百个字段,范例如下: create table t1( str1 varchar(16), str2 varchar(16), str3 varchar(16), …… ) 我的大部分查询都是i1主键查询;但也有10%左右的查询是使用的str50,str55,str60这三个字段查询;为了能加速此类查询,我创建了异步物化视图 create matrialized view v1 (str50,str55,str60,str1,……) build immediate refresh auto on commit …… as select str50,str55,str60,str1,…… from t1 ; 对于类似select * from t1 where (str50='x' and str55='x' str60='x') or (str50='x' and str55='x' and str60='x') or (str50='x' and str55='x' and str60='x') or (str50='x' and str55='x' and str60='x') ,这类查询,我希望查询去查询我重建的异步物化视图v1,而不是原表。 但现在(doris版本:2.1.7)通过执行计划和性能测试来看,都是查询的原表。 ### Solution 应该对查询计划进行改写,改为查询异步物化视图; 但现在的代码(AbstractMaterializedViewRule中的doRewrite)没有实现查询改写去查询异步物化视图 ### Are you willing to submit PR? - [x] Yes I am willing to submit a PR! ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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.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