Techniques for a database management system to predict when in the future a materialized view will be used for query rewrite. This is a followed by an approach that uses the quiet rewrite pattern prediction to determine an optimized schedule for refreshing the materialized view. The approach combines the query rewrite pattern prediction with a quiet period prediction for the materialized view and an estimated refresh duration for the materialized view to determine the optimized refresh schedule for the materialized view.