Materialized Views
Published July 26, 2025
By Sai Sree Ram Gundepudi
Materialized Views
Unlike normal views, materialized views store the query result physically and can be refreshed periodically.
CREATE MATERIALIZED VIEW dept_sales_mv
BUILD IMMEDIATE
REFRESH FAST ON COMMIT
AS
SELECT department_id, SUM(sale_amount) AS total_sales
FROM sales
GROUP BY department_id;Improves performance in reporting scenarios.