From the course: Advanced SQL for Data Scientists

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Materialized views

Materialized views

From the course: Advanced SQL for Data Scientists

Start my 1-month free trial

Materialized views

- [Instructor] Now, another technique in our data modeling toolbox that we can use to officially work with really large datasets is something called materialized views. Now, a materialized view basically persists the results of a query. So rather than executing a query, say, multiple times and actually going through all the steps of the particular execution plan and then getting our results back, we can actually save the results after executing the query once and then we can go back and read that saved result sets many times. The value here is that reading from a single table can be much faster than executing a complex query over and over again to get the same data. So we can think of materialized views as a form of caching. It's also a way of getting some of the value of WideTable denormalization while still having on the side a more normalized model. And, ultimately, we're trading space for time, so you want to…

Contents