Bird
0
0

Which statement best describes the behavior of indexes on materialized views when the view is refreshed?

hard📝 Conceptual Q10 of 15
PostgreSQL - Views and Materialized Views
Which statement best describes the behavior of indexes on materialized views when the view is refreshed?
AIndexes become invalid and cause errors until manually rebuilt
BIndexes must be dropped and recreated manually after each refresh
CIndexes remain valid and are updated automatically during refresh
DMaterialized views cannot have indexes if they are refreshed
Step-by-Step Solution
Solution:
  1. Step 1: Understand refresh behavior

    Refreshing a materialized view replaces its data but PostgreSQL maintains indexes automatically.
  2. Step 2: Confirm index validity

    Indexes stay valid and are updated with the refreshed data without manual intervention.
  3. Final Answer:

    Indexes remain valid and are updated automatically during refresh -> Option C
  4. Quick Check:

    Materialized view refresh updates indexes automatically [OK]
Quick Trick: Indexes auto-update on materialized view refresh [OK]
Common Mistakes:
  • Thinking indexes must be dropped and recreated
  • Assuming indexes become invalid after refresh
  • Believing materialized views cannot have indexes if refreshed

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PostgreSQL Quizzes