In Salesforce, Async SOQL means Asynchronous SOQL. It is an asynchronous process in which we run the SOQL queries over the Salesforce entity data, including subjects, BigObjects, and external objects.
In this Salesforce tutorial, I will explain asynchronous SOQL and how to query large objects using asynchronous SOQL in Salesforce.
What is Async SOQL in Salesforce?
In Salesforce, Async SOQL is an asynchronous process used to handle large amounts of data efficiently.
Unlike regular SOQL, which processes queries immediately, Async SOQL runs in the background, allowing you to work on other tasks while it processes. It is particularly useful for querying millions of records, such as data stored in Big Objects.
In the Async SOQL queries, the results are stored in a target object for further use. It can query large amounts of data stored in Salesforce, where we can query up to 1 million records. For extra capacity, an add-on license is required.
Async SOQL Big Object in Salesforce
In Salesforce, Big Objects are used to handle massive amounts of data that our organization accumulates over time. They store and manage billions of records, providing a way to archive data or log records without consuming standard object storage limits.
Due to the large data size of the big objects, it is challenging to query them using common SOQL methods, which negatively impacts performance due to the large data size.
To resolve this, we use the Async SOQL, an asynchronous query method specifically used for efficiently querying Big Objects.
Salesforce Big Objects Async SOQL Retirement
In the release of summer 2023, the Async SOQL feature of Big Objects is not supported in Salesforce.
When performing Asynchronous SOQL on Big Objects, you must use the Bulk API or batch Apex to query or report on custom Big Objects after upgrading your org to the Summer ’23 release. After the update, no jobs running Async SOQL will be available.
What is the Alternative to Async SOQL for Querying Big Objects?
As an alternative to the Async SOQL, we will query big objects using the bulk API method and the Salesforce Workbench.
Querying Big Objects Using Bulk API in Salesforce
To query Big Objects in SOQL, the Big Objects require a defined index for efficient querying. Ensure you have indexed fields to facilitate data querying.
The big object should have an indexed field, and the query must include indexed fields in the WHERE clause.
If the above conditions are true for your organization, then follow the steps below.
- First, ensure that bulk API is enabled in your org, and for that, navigate to Setup > Feature Settings > Data > Bulk Data Load Jobs.
- Now, in the developer console query editor, execute the SOQL query with the below syntax and ensure that indexed fields are included in the WHERE clause.
Syntax:
SELECT Field1, Field2 FROM BigObjectName__b WHERE IndexedField1 = 'value'- In my org, I have a custom object Customer_Interaction__b with the indexed field, so I have executed the query in the following way.
SELECT Customer_ID__c, Interaction_Date__c, Interaction_Type__c FROM Customer_Interaction__b
WHERE Interaction_Type__c = 'Phone'
AND Interaction_Date__c = 2024-12-11T00:00:00.000ZOutput:

In the output, you will see the records retrieved from the Salesforce Big Object.
- We can also use tools like Salesforce Workbench. There, we have to navigate to workbench.developerforce.com and log in with the Salesforce account credentials.
- In the workbench, select Jump to: SOQL query, then Big Object from the Object lookup field, and click on the Select button.
- Paste the SOQL query defined with the WHERE clause and execute it.

In the query results, you will see the records that are true with the conditions in the SOQL query.
- To create a bulk query job, click on the Utilities tab and select REST Explorer.

- In the REST Explorer, select the POST and enter /services/data/v62.0/jobs/query. Here, v62.0 is the version of my org.
- You can check the org version from Setup> Apex Classes. Then, in the API version column, you can see the version of your organization.
- Then, enter the SOQL query; in the request body, enter the code below and click on the Execute button.
{
"operation": "query",
"query": "SELECT Customer_ID__c, Interaction_Date__c, Interaction_Type__c FROM Customer_Interaction__b WHERE Interaction_Type__c = 'Phone' AND Interaction_Date__c = 2024-12-11T00:00:00.000Z"
}- We will get the operation details after a successful POST API run. Here, we have to copy the job ID that we will use in the GET API method to get the results.

- Now, enter the GET API with the following address and execute it.
/services/data/v62.0/jobs/<job id>/results
When processing and querying the extensive data records of the Salesforce Big Objects, it might take some time to process the batch.
An alternative way to check queried results is by navigating to Setup > Bulk Data Jobs. Here, you have to click on the job batch id.
Then scroll down to the section Batches and click on the button View result to view the records.

This way, we can query the Big objects using the Bulk API in Salesforce.
Conclusion
In this Salesforce tutorial, we learned about the async SOQL in Salesforce. Since the async SOQL is retired, we discussed an alternative method to query large objects in Salesforce, which involves using the Bulk API to query big objects.
By following this method, you will be able to query bulk data from the big objects in Salesforce.
You may also like to read:
- Alias Notations in Salesforce SOQL
- Get User Or Logged-In User Details Using SOQL
- Track Object Field History in Salesforce using SOQL
- Create a For Loop to Iterate Through a SOQL Query in Salesforce
- Salesforce SOQL and SOSL Limits for Search Queries
I am Bijay Kumar, the founder of SalesforceFAQs.com. Having over 10 years of experience working in salesforce technologies for clients across the world (Canada, Australia, United States, United Kingdom, New Zealand, etc.). I am a certified salesforce administrator and expert with experience in developing salesforce applications and projects. My goal is to make it easy for people to learn and use salesforce technologies by providing simple and easy-to-understand solutions. Check out the complete profile on About us.