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
- [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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.