Newer Version Available
QueryOptions
Specifies the preferred batch size for queries. The system sometimes creates batches
that are larger or smaller than the specified size to maximize performance.
Associated API Calls
Fields
| Element Name | Type | Description |
|---|---|---|
| batchSize | int |
The batch size for the number of records returned in a query() or queryMore() call. Child objects count toward the number of records for the batch size. For example, in relationship queries, multiple child objects are returned per parent row returned. The default is 500; the minimum is 200, and the maximum is 2,000. There is no guarantee that the requested batch size requested is the actual batch size; changes are sometimes made to maximize performance. |
Sample Code
For code examples, see Change the Batch Size in Queries in the Salesforce SOQL and SOSL Reference Guide.