From the course: Designing Highly Scalable and Highly Available SQL Databases
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Aggregation and sampling for analytical queries
From the course: Designing Highly Scalable and Highly Available SQL Databases
Aggregation and sampling for analytical queries
- [Instructor] Another data modeling pattern that can help us with scalability is aggregating. And aggregating is especially useful with time series data. And that's because aggregating takes advantage of the fact that data that is recent is oftentimes more valuable and more interesting in detail than older data. Now older data is still useful, but we don't necessarily need fine grained detail with much older data. So what we can do is actually aggregate the data because we typically, looking at older data, we'll actually look at it in aggregate. So for example, we wouldn't look at sales across say an hour from six months ago, but we might look at sales by day or by week. So one thing we can do to save on storage and on processing from a query perspective, is to actually build aggregates and keep the aggregates, not query for the finer grained data. What we can do is actually do this in a gradual way. So for example,…
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.
Contents
-
-
-
-
-
-
(Locked)
Transactional vs. analytical queries5m 41s
-
(Locked)
Indexing for transactional queries10m 11s
-
(Locked)
Materialized views for transactional queries3m 51s
-
(Locked)
Using read replicas to improve query performance2m 55s
-
(Locked)
Understanding write-ahead logging5m 6s
-
(Locked)
Denormalizing for analytical queries4m 18s
-
(Locked)
Aggregation and sampling for analytical queries5m 45s
-
(Locked)
Challenge: Optimize a data model for an analytical queries25s
-
(Locked)
Solution: Optimize a data model for an analytical queries35s
-
(Locked)
-