function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ap30Ap30 

can we perform more than 100 soql queries in one transaction using future function

ShivankurShivankur (Salesforce Developers) 
Hi Ap30,

Please note, the limits count for each Apex transaction. For Batch Apex, these limits are reset for each execution of a batch of records in the execute method.

Following are the limits for synchronous Apex and asynchronous Apex (Batch Apex and future methods) when they’re different. Otherwise, this provides only one limit that applies to both synchronous and asynchronous Apex.

Total number of SOQL queries issued :
Synchronous Limit : 100
Asynchronous Limit : 200

In a SOQL query with parent-child relationship subqueries, each parent-child relationship counts as an extra query. These types of queries have a limit of three times the number for top-level queries. The limit for subqueries corresponds to the value that Limits.getLimitAggregateQueries() returns. The row counts from these relationship queries contribute to the row counts of the overall code execution. This limit doesn’t apply to custom metadata types. In a single Apex transaction, custom metadata records can have unlimited SOQL queries. In addition to static SOQL statements, calls to the following methods count against the number of SOQL statements issued in a request.
  • Database.countQuery
  • Database.getQueryLocator
  • Database.query
You can find more details about Governor limits in this documentation (https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_gov_limits.htm).

Hope above information helps, Please mark as Best Answer so that it can help others in the future.

Thanks.
PriyaPriya (Salesforce Developers) 

Hi 

yes! Possible. You can do to upto 200 for aysnchronous. 

Also refer below article for more informatoion :- 
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_gov_limits.htm
 

If above information helps you, pease mark it as Best Answer so that it can help others in the future.

Regards,

Priya Ranjan