You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudberry.apache.org by "avamingli (via GitHub)" <gi...@apache.org> on 2025/06/04 09:48:00 UTC
[D] [Ideas] Shall we enable answer_query_using_materialized_views by default in v2.0? [cloudberry]
GitHub user avamingli created a discussion: [Ideas] Shall we enable answer_query_using_materialized_views by default in v2.0?
### Description
Our AQUMV feature now comprehensively supports:
* Regular/partitioned/foreign tables
* Materialized views/ Incremental Materialized views/ Dynamic Tables
* Full/partial query replacement for most SQL constructs (Aggregation, GROUP BY, DISTINCT, ORDER BY, etc.)
After running successfully in production for over a year, this feature has demonstrated:
* Significant performance gains from direct resultset returns
* Remarkable stability in customer environments
Currently disabled by default (enable_answer_query_using_materialized_views = off), how about enabling it for v2.0 by default to benefit more users?
Are concerns?
### Use case/motivation
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
GitHub link: https://github.com/apache/cloudberry/discussions/1142
----
This is an automatically sent email for dev@cloudberry.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@cloudberry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: dev-help@cloudberry.apache.org
Re: [D] [Ideas] Shall we enable answer_query_using_materialized_views by default in v2.0? [cloudberry]
Posted by "yjhjstz (via GitHub)" <gi...@apache.org>.
GitHub user yjhjstz added a comment to the discussion: [Ideas] Shall we enable answer_query_using_materialized_views by default in v2.0?
plan time increased ? we can offer some data to discuss.
GitHub link: https://github.com/apache/cloudberry/discussions/1142#discussioncomment-13374237
----
This is an automatically sent email for dev@cloudberry.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@cloudberry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: dev-help@cloudberry.apache.org
Re: [D] [Ideas] Shall we enable answer_query_using_materialized_views by default in v2.0? [cloudberry]
Posted by "avamingli (via GitHub)" <gi...@apache.org>.
GitHub user avamingli added a comment to the discussion: [Ideas] Shall we enable answer_query_using_materialized_views by default in v2.0?
Yes, this is an inevitable trade-off. However, compared to the significant time and resource savings provided by AQUMV—especially when handling large-scale data and SQL queries involving aggregations—the additional planning time is negligible.
In fact, after merging https://github.com/apache/cloudberry/pull/1117, the planning time has already been drastically reduced from 78.942 ms to just 1.6 ms, making the impact minimal.
Additionally, we have ongoing plans for further optimizations. Therefore, this will not be a concern in practice.
GitHub link: https://github.com/apache/cloudberry/discussions/1142#discussioncomment-13386135
----
This is an automatically sent email for dev@cloudberry.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@cloudberry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: dev-help@cloudberry.apache.org
Re: [D] [Ideas] Shall we enable answer_query_using_materialized_views by default in v2.0? [cloudberry]
Posted by "yjhjstz (via GitHub)" <gi...@apache.org>.
GitHub user yjhjstz added a comment to the discussion: [Ideas] Shall we enable answer_query_using_materialized_views by default in v2.0?
Orca planner does not support answer_query_using_materialized_views yet. So change answer_query_using_materialized_views to true, a little bit confused.
GitHub link: https://github.com/apache/cloudberry/discussions/1142#discussioncomment-13453410
----
This is an automatically sent email for dev@cloudberry.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@cloudberry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: dev-help@cloudberry.apache.org
Re: [D] [Ideas] Shall we enable answer_query_using_materialized_views by default in v2.0? [cloudberry]
Posted by "avamingli (via GitHub)" <gi...@apache.org>.
GitHub user avamingli edited a comment on the discussion: [Ideas] Shall we enable answer_query_using_materialized_views by default in v2.0?
In GPDB/CBDB, if a feature affects ORCA, its GUC typically follows the format optimizer_xxx. Else, most GUCs do not guarantee ORCA will use the feature by default.
Adding a note in the documentation clarifying this behavior should suffice.
GitHub link: https://github.com/apache/cloudberry/discussions/1142#discussioncomment-13455850
----
This is an automatically sent email for dev@cloudberry.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@cloudberry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: dev-help@cloudberry.apache.org
Re: [D] [Ideas] Shall we enable answer_query_using_materialized_views by default in v2.0? [cloudberry]
Posted by "avamingli (via GitHub)" <gi...@apache.org>.
GitHub user avamingli added a comment to the discussion: [Ideas] Shall we enable answer_query_using_materialized_views by default in v2.0?
In GPDB/CBDB, if a feature affects ORCA, its GUC typically follows the format optimizer_xxx. Else, most GUC does not guarantee ORCA will use the feature by default.
Adding a note in the documentation clarifying this behavior should suffice.
GitHub link: https://github.com/apache/cloudberry/discussions/1142#discussioncomment-13455850
----
This is an automatically sent email for dev@cloudberry.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@cloudberry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: dev-help@cloudberry.apache.org