Handling Aggregated Queries in a Database

If a significant proportion of queries look at more than one of the aggregated values, store all these aggregations within the same summary table. This will speed up a larger percentage of queries, at the cost of slightly affecting the performance of queries that look at only a single aggregation. Every column added will affect the performance of queries. As a guideline, I would suggest that you add no more than a handful of aggregated columns. The precise determination has more to do with the size of the columns than with the number, because that will determine the scan-time performance. It is good practice to calculate the achievable query performance if you intend to substantially increase the row size of the summary table. Finally, always bear in mind that you may be aggregating a number of dimensions into the same table, which will exacerbate the problem.

Leave Your Comment

Name*
Mail*
Website
Comment