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

Aggregation and sampling for analytical queries

From the course: Designing Highly Scalable and Highly Available SQL Databases

Start my 1-month free trial

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,…

Contents