PK Chunking and how it works in Salesforce?
Noor Alam Shuvo
Salesforce Certified Application Architect | Sr. Staff Engineer
PK stands for Primary Key. The primary key is the object's RecordID which is always indexed. PK Chunking splits bulk queries on large tables into chunks based on the record IDs, or primary keys, of the queried records. Each chunk is processed as a separate batch that counts toward the daily batch limit.
To enable the feature, you specify the header ‘Sforce-Enable-PKChunking‘ on the job request for your Bulk API query.
Sforce-Enable-PKChunking
How PK Chunking works: demonstration
Here are some basic things about PK Chunking
Sforce-Enable-PKChunking: chunkSize=250000;
Sforce-Enable-PKChunking: chunkSize=50000; startRow=00130000000xEftMGH
Some query limitations apply that?effectively disable PK chunking?for the specified bulk query job