Bird
0
0

Why might a materialized view become outdated compared to a regular view in PostgreSQL?

hard📝 Conceptual Q10 of 15
PostgreSQL - Views and Materialized Views
Why might a materialized view become outdated compared to a regular view in PostgreSQL?
ABecause regular views store data physically and materialized views do not.
BBecause materialized views do not automatically update when base tables change.
CBecause materialized views run the underlying query every time they are accessed.
DBecause regular views cache data and materialized views do not.
Step-by-Step Solution
Solution:
  1. Step 1: Understand update behavior of materialized views

    Materialized views store data and require manual or scheduled refresh to update.
  2. Step 2: Contrast with regular views

    Regular views run the query on each access, always showing current data.
  3. Final Answer:

    Because materialized views do not automatically update when base tables change. -> Option B
  4. Quick Check:

    Outdated data reason = D [OK]
Quick Trick: Materialized views need refresh; regular views always current [OK]
Common Mistakes:
  • Thinking materialized views auto-update
  • Confusing caching behavior of views
  • Assuming materialized views run queries on each access

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PostgreSQL Quizzes