What is Salesforce PK Chunking?
PK Chunking is a Salesforce feature built for large datasets. Salesforce Primary Key (PK) is the object’s indexed record ID. Steps to use PK Chunking:1
Query the target table to identify a number of chunks of records
2
Send separate queries to extract the data in each chunk
3
Lastly combine the results.
Enabling Salesforce PK Chunking
By enabling this feature, Salesforce automatically splits the Bulk API Query job into multiple batches. We then poll for the progress of each of the batch then process them in parallel once all are done, resulting in significantly reduced job run times. The parallelism depends on cluster node count.