Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
742 views3 pages

Governor Limit in Salesforce

Salesforce Governor Limits define runtime limits that are applied to provide performance in Salesforce's multitenant environment. The document lists many specific limits, such as allowing only one batch apex job to start at a time, limiting batch apex methods to 250,000 executions per 24 hours, and limiting SOQL queries to 100 per execution. It provides recommendations for overcoming governor limits, such as avoiding loops with SOQL/DML, using batch apex for large data volumes, and leveraging annotations. The document also explains how to configure email warnings for when governor limits are exceeded.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
742 views3 pages

Governor Limit in Salesforce

Salesforce Governor Limits define runtime limits that are applied to provide performance in Salesforce's multitenant environment. The document lists many specific limits, such as allowing only one batch apex job to start at a time, limiting batch apex methods to 250,000 executions per 24 hours, and limiting SOQL queries to 100 per execution. It provides recommendations for overcoming governor limits, such as avoiding loops with SOQL/DML, using batch apex for large data volumes, and leveraging annotations. The document also explains how to configure email warnings for when governor limits are exceeded.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

What is a Governor Limit in Salesforce?

Salesforce Governor Limits are the run time limits that are apply in order to have
some performance to the database since it runs on multi tenancy environment.
List of Salesforce Governor Limits.
 Only one batch apex job’s start method can run at a time in an organization.
 Up to 5 queued or active batch jobs are allowed for apex.
 Maximum 2,50,000 batch apex method executed per a 24 hour period.
 The batch apexstart method can have up to 15 query cursors open at a time per
user.
 Maximum of 50 million record can be returned in the database. Querylocator
object.
 Maximum number of SOSL Queries – only 20.
 Maximum number of SOQL Queries – 100.
 No of DML statements – 150.
 No of record written by a query – 50000.
 maximum number of DML rows – 10,000.
 Maximum number of script statements – 2,00,000.
 Maximum heap size – 6MB.
 Maximum number of call outs – 10.
 Maximum number of future calls – 10.
 Maximum number of picklist describe – 10.
 Maximum number of record type describe – 100.
 Maximum number of relationship describe – 100.
 Maximum number of fields describe – 100.
 Maximum number of Email invocations – 10.
Note :- If we have 1000 records with scope of 200 records then they are divided
into 5 batches.
Limitations:- 
 Methods declared as future aren’t allowed in the classes that implement
Database. Batchable interface.
 Methods declared as future can’t be called from Batch Apex class.
 For sharing recalculations, we recommend that the execute method delete and
then re-create all Apex manages sharing for the records in the batch.
How to Overcome Governor limits in Salesforce?
To overcome Salesforce Governor Limits a special care must be taken while
writing code.
1. Never make any SOQL and DML operation inside the loop.
2. Use les number of script statements.
3. Use batch apex, when working with above 50000 records.
4. Use @future.
5. Use Batch Apex.
6. Use Annotations.
7. Use for loop.
8. Using ‘in’ clause.
How to set up governor limit email warning in Salesforce?
We can specify user’s to receive an email notification when they invoke Apex
code that surpasses 50% of allocated Salesforce Governor Limits. Follow the
steps given below to set up governor limit email warning in Salesforce.
 Go to Setup | Administer | Manage users | Users | Edit
To activate send Apex Warning Emails check box user must have administrator
profile. If not we can not activate send Apex warning Emails in Salesforce.

You might also like