Physical Database Design: The Database Professional's Guide to Exploiting Indexes, Views, Storage, and More

For seven and a half million years, Deep Thought computed and calculated, and in the end announced that the answer was in fact Forty-two and so another, even bigger, computer had to be built to find out what the actual question was.
The Restaurant at the End of the Universe , by Douglas Adams
Our philosophy starts with the premise that a result is a terrible thing to waste and that its generation cost should be amortized over multiple uses of the result.
Kotidis and Roussopoulos, inventors of the DynaMat view management system
What is the answer to life, the universe, and everything? That is the question posed to Deep Thought in The Hitchhiker s Guide to the Galaxy by Douglas Adams. The question tied up Deep Thought for seven and a half million years. We tend not to ask such profound questions of our databases, but we do hope to find meaningful answers in a reasonable amount of time. If our query analyzer tells us a query will take seven and a half million years to run, we should probably look for a better solution. This chapter explores the use of materialized views to speed up query responses.
Make the common case fast. A large number of queries are posed against our database every day. There tend to be many queries that occur a few times, and a few queries that occur frequently. We have a database in third normal form (3NF). Some of the tables are...