What is the difference between a normal view and a materialized view?
💡 Model Answer
A normal (or virtual) view is a stored SELECT statement that is executed each time the view is queried. It does not store data physically; it simply presents data from underlying tables, so it always reflects the latest data but can be slower for complex queries. A materialized view, on the other hand, stores the result set physically on disk. It is refreshed periodically (manually or automatically) and can be indexed, making query performance much faster for read‑heavy workloads. However, because it is not updated in real time, it may contain stale data between refreshes. Use normal views for simple, up‑to‑date reporting and materialized views when you need high performance for large, complex aggregations and can tolerate occasional staleness.
This answer was generated by AI for study purposes. Use it as a starting point — personalize it with your own experience.
🎤 Get questions like this answered in real-time
Assisting AI listens to your interview, captures questions live, and gives you instant AI-powered answers — invisible to screen sharing.
Get Assisting AI — Starts at ₹500