ORGZIP / GUIDES

Which Cases use the most email storage? Find out in 15 minutes.

Start with Setup → Storage Usage for the total, then run five read-only SOQL queries to see which Cases, which years and which direction of email hold the weight. Nothing here changes data.

  • By OrgZip
  • Updated November 29, 2026

Step 1: read the total in Storage Usage

  1. Open Setup → Storage Usage.
  2. In the Data Storage table, note the record count and storage for EmailMessage, Task and Event.
  3. Divide EmailMessage storage by its record count. That is your average email size. In our test org, bodies were counted by size, so an average well above 2 KB means long bodies are driving storage.

Storage Usage updates with a delay and shows rounded figures. Read it twice, a day apart, before you plan around a number.

Step 2: run five read-only queries

Use the Developer Console Query Editor or the Salesforce CLI. In a very large org, an aggregate query can time out; add a date filter such as CreatedDate < LAST_N_DAYS:365 and run it per year.

1. Cases with the most emails. Long threads are the first candidates.

Read-only SOQL
SOQL
SELECT ParentId, COUNT(Id) emailsFROM EmailMessageGROUP BY ParentIdORDER BY COUNT(Id) DESCLIMIT 50

2. Emails on Cases closed more than a year ago. These are usually safe to archive, because nobody is working the Case.

Read-only SOQL
SOQL
SELECT COUNT()FROM EmailMessageWHERE Parent.IsClosed = trueAND Parent.ClosedDate < LAST_N_DAYS:365

3. Emails by year. Shows how fast storage is growing.

Read-only SOQL
SOQL
SELECT CALENDAR_YEAR(CreatedDate) yr, COUNT(Id) emailsFROM EmailMessageGROUP BY CALENDAR_YEAR(CreatedDate)ORDER BY CALENDAR_YEAR(CreatedDate)

4. Incoming versus outgoing. Outgoing replies often carry the whole quoted thread.

Read-only SOQL
SOQL
SELECT Incoming, COUNT(Id) emailsFROM EmailMessageGROUP BY Incoming

5. The Tasks your emails created. In our test org, every outgoing email created a Task with TaskSubtype = Email: 46 outgoing emails, 46 Tasks. They count toward Data Storage too.

Read-only SOQL
SOQL
SELECT TaskSubtype, COUNT(Id) tasksFROM TaskGROUP BY TaskSubtype

Step 3: read the results

How to read the email storage queries
If you seeIt usually meansWhat to do
A few Cases with hundreds of emailsLong threads, auto-replies or a loop between two mailboxes.Check for an email loop first. Then archive the closed ones as a batch.
Most emails sit on Cases closed over a year agoStorage is history nobody works on but somebody may need to read.Archive with a retention window instead of deleting, so agents can still find them.
Steady growth year on yearVolume, not a one-off import.Plan a recurring archive job, not a one-time clean-up.
Many outgoing emails and as many Email TasksReplies with quoted threads, plus a Task per email.Archive the email and its Task together so the history stays whole.

To turn the counts into money, put the GB you could free and your contract price per GB into the storage calculator. For the measured overhead of archiving, see how much storage a Salesforce email uses.

Questions

How do I see how much storage EmailMessage uses in Salesforce?

Open Setup, then Storage Usage. The Data Storage table lists EmailMessage with its record count and storage. Divide storage by record count to get the average size per email in your org.

Can SOQL tell me which emails are the largest?

Not directly. TextBody and HtmlBody are long text fields, so SOQL cannot sort, group or sum by their length. Use counts per Case and per age to find where emails pile up, and the Storage Usage average to estimate size.

Why does my EmailMessage average look larger than 2 KB?

Because email bodies are counted by size. In our test org, 300 emails of about 96 KB each added about 28 MB to Data Storage. Long HTML emails and quoted reply chains push the average up.

Do email attachments count toward Data Storage?

Attachments count toward File Storage, not Data Storage. Check them separately before you decide what to archive or delete.

Keep reading

How much storage does a Salesforce email use?

EmailMessage storage measured in a test org: body size, the Recycle Bin, and what archiving freed.

Read the guide

Salesforce Data Storage is full: what to do

What happens at the limit, what frees space, and a checklist for the first 24 hours.

Read the guide

Case emails to PDF, or archive them?

What a PDF keeps and loses compared with an archive: search, reply, restore and cost.

Read the guide

Let the scan run the queries for you.

OrgZip’s read-only assessment counts emails, Tasks and Events per object and age, and estimates the Data Storage you could free after the archive’s own overhead. It changes nothing in your org.

Get a read-only assessment