# What are the primary differences in governor limits between synchronous transactions and asynchronous Apex executions?

**Topic:** Apex · **Difficulty:** Medium · **Tags:** Apex, Asynchronous Apex, Governor Limits

Read it on the site: https://www.forcechallenges.com/interview-questions/what-are-the-primary-differences-in-governor-limits-between-synchronous-transactions-and-asynchronous-apex

## Answer

**Basics:** Governor limits protect the multi-tenant platform. Because async work runs in the background, Salesforce lets it use more resources, which is why heavy processing, integrations and data fixes belong there.

**How it works:** Every async execution is a separate transaction with its own limit counters (each batch `execute()`, each queueable, each future call).

**Advanced / deep dive:** Comparison of the main numbers:
- Heap: 6 MB sync, 12 MB async.
- CPU time: 10,000 ms sync, 60,000 ms async.
- SOQL queries: 100 sync, 200 async.
- Unchanged across both: 150 DML statements, 10,000 DML rows, 50,000 SOQL rows, 100 callouts and 120 s cumulative callout time.
- Future calls: up to 50 per sync transaction; none from batch or future.
- Queueable: up to 50 enqueued from a sync transaction, only 1 from a running queueable.
- Batch: 5 concurrent active jobs, 100 in the Flex Queue, scope 1 to 2000.
- Scheduled Apex: max 100 jobs.
- Daily async executions (batch chunks, future, queueable, scheduled): greater of 250,000 or licenses x 200 per 24 hours.

Design implications: DML and row limits do not grow, so batch scope is how you stay under 10,000 rows. Trigger code that runs because an async job did DML still runs under the async limits of that transaction, so the whole chain shares one limit set.

**Code / config example:**
```apex
// Log what ceiling you actually have in this context
System.debug('Heap: ' + Limits.getHeapSize() + '/' + Limits.getLimitHeapSize());
System.debug('CPU: ' + Limits.getCpuTime() + '/' + Limits.getLimitCpuTime());
System.debug('SOQL: ' + Limits.getQueries() + '/' + Limits.getLimitQueries());
```

**Hidden gotchas & must-remember points:**
- Async does not raise DML (150), DML rows (10,000), or SOQL rows (50,000).
- A trigger fired by async DML gets async limits, not sync ones.
- Callout timeout is cumulative 120 s per transaction in both.
- Daily async execution cap is org-wide; heavy per-record jobs can exhaust it.
- Limits are per transaction, so each batch chunk starts fresh.
- Exceeding a limit throws an uncatchable `LimitException`.

**Best practice:** Offload heavy logic to async, but still bulkify, because the DML and row limits are the same.

---
Source: ForceChallenges · last updated 2026-11-02
