+ Start a Discussion
Siva Sankar PaluriSiva Sankar Paluri 

Batch Size in Data Loader settings

Hi All,

In my Data Loader settings Batch Size is 200 and while updating the data(.csv with 45 records) i got an error MiB_Rules: System.LimitException: Too many SOQL queries: 101.
I updated batch size to 1 and performed the same action and data load update process went through. Not sure how batch size is impacting the number of SOQL queries.

Can someone please clarify out of your own experience.

Thank you!!
David HalesDavid Hales
Hi Shiva,

Batch Size does not impact the number of SOQL queries. By default batch size is 200 which means if your selected file has more than 200 records so it will update or insert your data in multiple transactions with 200 each in a single transaction. If you want to insert or update more 200 records in a single transaction then you can increase your batch size.

Please go through these urls for more detail on Data Loader 

1.  https://help.salesforce.com/articleView?id=configuring_the_data_loader.htm&type=5
2.  https://resources.docs.salesforce.com/204/latest/en-us/sfdc/pdf/salesforce_data_loader.pdf

Best Regards,
David Hales

Arpit Jain7Arpit Jain7
Hi Siva,

May be you are having some apex code with SOQL query inside for loop and due to that you are getting Too many SOQL queries: 101 exception. When you are changing batch size to 1 for loop only traverse single time hence you are not getting error.

So please check your apex code and then put your SOQL query outside for loop.


Please mark this answer as SOLVED and BEST ANSWER if it helps you.