logo
Published on

CH4. View Processing

Authors
  • avatar
    Name
    seren-wib
    Twitter
Contents

View Processing on One Page (5.2)

1. How views are processed

ApproachWhat it doesPros and cons
Query modificationRewrites a query on the view into a query on the base tables and runs thatNothing stored, joins every time
View materializationBuilds the view as a real table and keeps it for a whileFast, but must be updated when the base tables change (incremental update)
When a stored view is updatedWhenProblem
ImmediateAs soon as the base tables changeUpdates even when nobody uses it
LazyWhen a query hits the viewOld values until then
PeriodicPeriodicallyResults may not be up to date

2. Numbers to memorize

How manyWhat
2View processing approaches
3View update timings