Salesforce provides a multitenant environment for running the Apex coding, so the runtime of Apex engine strictly enforces a number of limits for ensuring the runaway scripts and scripts don’t monopolize shared resources.
The Governors limits the track and enforce the statistics to be displayed in the below table.:
Trigger | Class | Test | |
Total number of SOQL's | 20 | 100 | 100 |
Total number of SOQL's | 0 | 20 | 20 |
Total number of records Retrieved by single SOQL Query | 1000 | 10000 | 500 |
Total number of records Retrieved by single SOSL Query | 0 | 200 | 200 |
Total Number Of Call out Methods | 10 | 10 | 10 |
Total number of send email methods allowed | 10 | 10 | 10 |
Total Heap Size 300000 Bytes 3MB | 300000 Bytes | 3 MB | 1.5 MB |
Note that,
the Governor limits can be enlarged from release to release.
And if scripts exceeds over limit then the associated governor issues a runtime exception that cannot be handled.