From the course: Microsoft Azure Synapse for Developers

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Optimizing queries with materialized views

Optimizing queries with materialized views

From the course: Microsoft Azure Synapse for Developers

Optimizing queries with materialized views

- [Instructor] In most cases, for complicated queries, you'll need to create views. This way, you can encapsulate the logic inside the view for later use. To improve query performance, dedicated SQL pools support materialized views. A materialized view pre-computes, stores, and maintains its data in a dedicated SQL pools just like a table. When we query the view, there won't be any computation needs. It will just give us the data just like we were querying a table. This way, queries that use all of the data, or just a subset of the data inside the materialized view will be very fast. I have to go ahead and create a view with a query from our data warehouse. This is a normal view. Create view AverageCheckoutView. And then as we select StoreCode, Date, SelfCheckout, CashOnHand, StoreSize, and then the maximum and the minimum duration. We are going to get this data from our CheckoutEvents table. And then…

Contents