CS FundamentalsHardProduct-company MCQ pattern

A trigger-based implementation of a materialized view manually re-runs the entire defining query and replaces all the materialized rows every time ANY relevant base table changes. What is the main inefficiency of this 'full refresh' approach compared to incremental view maintenance?

  1. A. Full refresh cannot be used for materialized views with aggregates
  2. B. Full refresh is only possible for views with a single base table
  3. C. There is no inefficiency; full refresh is always optimal
  4. D. Full refresh redoes the ENTIRE computation (potentially scanning and joining large base tables) even when only a tiny fraction of the underlying data actually changed, whereas incremental maintenance computes just the delta needed to update the existing materialized result

Correct answer: D. Full refresh redoes the ENTIRE computation (potentially scanning and joining large base tables) even when only a tiny fraction of the underlying data actually changed, whereas incremental maintenance computes just the delta needed to update the existing materialized result

Recomputing a whole materialized view from scratch is simple to implement but wastes enormous work when, say, only a single row changed out of millions; incremental maintenance tracks exactly what changed (insert/update/delete) and propagates only the necessary adjustment to the already-materialized result, which is far cheaper but considerably more complex to implement correctly, especially for views with joins and aggregates.

More DBMS and SQL questions

Exams that ask this topic