---
schema_version: "1"
id: c5644dda68df80773b66eca0194c7f9838d1a803ff4a449a70097efabd9db9d0
title: Data Aggregation
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/salesforce-large-data-volumes-bp/guides/cce/ldv-deployments/ldv-deployments-case-studies-data-aggregation.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-large-data-volumes-bp/guide/ldv-deployments-case-studies-data-aggregation.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 26be129da6abf50c5b0830ce6ffa6e4cc9a9590e6a60a57ec8e445bd947cfae9
products:
  - Best Practices for Deployments with Large Data Volumes
  - Platform Developer Content
---

# Data Aggregation

## Situation

The customer needed to aggregate monthly and yearly metrics using standard reports. The customer’s monthly and yearly details were stored in custom objects with four million and nine million records, respectively. The reports were aggregating across millions of records across the two objects, and performance was less than optimal.

## Solution

The solution was to create an aggregation custom object that summarized the monthly and yearly values into the required format for the required reports. The reports were then executed from the aggregated custom object. The summarization object was populated using batch Apex.

