Skip to content
Back to skills

2540 Governor Limits Reference 9b9e160d

ASecurity

Essential limits for Salesforce data operations.

  • 11 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 11, 2026
businessgoapi

Works with

  • api

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 2540-governor-limits-reference_9b9e160d --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 2540 Governor Limits Reference 9b9e160d?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 2540 Governor Limits Reference 9b9e160d
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-2540-governor-limits-reference-9b9e160d/badge)](https://www.skillsdirectory.com/skills/tools-only-2540-governor-limits-reference-9b9e160d)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
<!-- Parent: sf-data/SKILL.md -->
# Governor Limits Reference

Essential limits for Salesforce data operations.

## SOQL Limits

| Limit | Synchronous | Asynchronous |
|-------|-------------|--------------|
| Total queries | 100 | 200 |
| Rows retrieved | 50,000 | 50,000 |
| QueryLocator rows | N/A | 50,000,000 |
| Query timeout | 120 seconds | 120 seconds |

## DML Limits

| Limit | Synchronous | Asynchronous |
|-------|-------------|--------------|
| DML statements | 150 | 150 |
| Rows processed | 10,000 | 10,000 |

## CPU and Memory

| Limit | Synchronous | Asynchronous |
|-------|-------------|--------------|
| CPU time | 10,000 ms | 60,000 ms |
| Heap size | 6 MB | 12 MB |

## Bulk API Limits

| Limit | Value |
|-------|-------|
| Batches per 24 hours | 10,000 |
| Records per 24 hours | 10,000,000 |
| Max file size | 100 MB |
| Concurrent jobs | 100 |

## Staying Within Limits

### SOQL Best Practices
```apex
// BAD: Query in loop
for (Account acc : accounts) {
    List<Contact> cons = [SELECT Id FROM Contact WHERE AccountId = :acc.Id];  // ❌
}

// GOOD: Single query with relationship
List<Account> accs = [
    SELECT Id, (SELECT Id FROM Contacts)
    FROM Account
    WHERE Id IN :accountIds
];  // ✓
```

### DML Best Practices
```apex
// BAD: DML in loop
for (Account acc : accounts) {
    update acc;  // ❌
}

// GOOD: Bulk DML
update accounts;  // ✓
```

## Monitoring Limits

```apex
System.debug('SOQL Queries: ' + Limits.getQueries() + '/' + Limits.getLimitQueries());
System.debug('DML Statements: ' + Limits.getDmlStatements() + '/' + Limits.getLimitDmlStatements());
System.debug('DML Rows: ' + Limits.getDmlRows() + '/' + Limits.getLimitDmlRows());
System.debug('CPU Time: ' + Limits.getCpuTime() + '/' + Limits.getLimitCpuTime());
System.debug('Heap Size: ' + Limits.getHeapSize() + '/' + Limits.getLimitHeapSize());
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in business →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.