Bird
0
0

Why might a materialized view become outdated, and how does PostgreSQL handle this?

hard📝 Conceptual Q10 of 15
PostgreSQL - Views and Materialized Views
Why might a materialized view become outdated, and how does PostgreSQL handle this?
ABecause PostgreSQL locks materialized views during base table updates
BBecause materialized views auto-update on base table changes
CBecause materialized views delete base tables after creation
DBecause base tables change; PostgreSQL requires manual refresh
Step-by-Step Solution
Solution:
  1. Step 1: Understand data freshness in materialized views

    Materialized views store snapshots; base table changes do not auto-update them.
  2. Step 2: PostgreSQL refresh behavior

    PostgreSQL requires manual REFRESH MATERIALIZED VIEW to update data.
  3. Final Answer:

    Because base tables change; PostgreSQL requires manual refresh -> Option D
  4. Quick Check:

    Materialized views = manual refresh after base changes [OK]
Quick Trick: Materialized views need manual refresh after base table changes [OK]
Common Mistakes:
  • Assuming automatic updates on base table changes
  • Thinking materialized views delete base tables
  • Believing PostgreSQL locks views during updates

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PostgreSQL Quizzes