## TL;DR

A 2M-row tabular report asks the database for everything at once. Add selective filters to cut the working set, switch to a summary report that aggregates server-side, or pull the data through the Bulk API instead of the report engine. Reports are for answers, not extracts.

## Error

```text
Report timed out: the report took too long to run. Try adding filters.
```

## Steps

1. Add filters on indexed, selective fields (record type, created date range, owner). Expected: the row count drops by an order of magnitude.
2. If the goal is a count or a sum, switch to a summary report with groupings. Expected: the database aggregates instead of returning rows.
3. If you truly need the rows, use the Bulk API query job instead of the report. Expected: millions of rows export reliably.
4. Schedule the report to run off-hours and email the result. Expected: no interactive timeout, and the data is ready in the morning.
5. For agents, never scrape the report UI; use the analytics API or Bulk API. Expected: programmatic access that does not time out.

## When to use

- Reports time out on large tables.
- An agent needs a full contact extract.
- After data volume grew past what the report handled.

## When not to use

- Dashboard timeouts (different caching behavior).
- Small reports timing out (then something else is wrong).

## Tool compatibility

- Salesforce report builder; Bulk API and analytics API.
- Scheduled reports.

## Variant phrasings

### report took too long to run

Add filters or go to the API.

### timeout on large contact report

Same fix; the table is just big.

## Why it happens

Reports run interactively with a timeout. Full-table scans of millions of rows exceed it, especially with unselective filters or formula fields that compute per row.

## Edge cases

- Formula fields in filters or columns force row-by-row evaluation; remove them from big reports.
- Joined reports are slower than their parts; split them.
- The Bulk API has its own limits but handles millions of rows by design.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_AeNz67v_kQHGICsa3bs9-A
