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
SumitkSumitk 

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.

https://help.salesforce.com/articleView?id=000320538&language=en_US&type=1&mode=1

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.

References:
https://rajvakati.com/2017/10/19/salesforce-async-soql/
https://www.janbasktraining.com/blog/what-is-asynchronous-in-salesforce/

Hope above information was helpful.

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

Thanks,
Vinay Kumar