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

Asynchronous/multi-threaded SOQL

If we use multiple SOQL query in Apex controller then is there any way to execute them in a asynchronous/multi-threaded fashion ?
VinayVinay (Salesforce Developers) 
Hi Sumit,

Asynchronous process will execute whenever resources are available and there is no process in order of execution.

Asynchronous Apex comes in four different flavors. 

>> Future Method: These are the methods which are used in synchronous transactions by using @future annotation on the method.
>> Batch Apex: This is used to run large jobs which contains millions of records.
>> Queueable Apex: These are also like future methods but has an ability to chain jobs with a class.
>> Scheduled Apex: These are scheduled to run at a specific time.


Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Vinay Kumar