From the course: Data Warehousing on Google Cloud Platform

Unlock this course with a free trial

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

Query optimization

Query optimization

- [Instructor] Optimizing your database architecture for query performance is critical. It's important not only for performance, but also for reducing your costs. Here are a few important considerations, some of which we've covered but would like to reiterate here. Limit joins by de-normalizing your most frequently queried tables. This can be done by creating data marts, which are subsets of data warehouses that usually contain de-normalized tables, as well as aggregated data used for analytics. Avoid self-joins, Cartesian or cross-joins as they can result in rather large data results. Use these wisely and only when necessary. Use native tables for more frequently queried tables as they are more efficient than external tables. Use partition tables and query on transaction or low dates to filter down data to only the needed rows. Lastly, make sure to use the correct data types when joining and as well as returning data. There are instances where your data can be stored in multiple data…

Contents