Make your executions extremely fast!
A bulk operation is a process of bringing all the data from the application into the database server at once. It ignores some database specific activities (i.e.: Logging, Audits, Data-Type Checks, Constraints, etc) behind the scene, thus gives you maximum performance during the operation.
Basically, you mostly do the normal Delete, Insert, Merge and Update operations when interacting with the database. Through this, the data is being processed in an atomic way. If you do call the batch operations, it only execute the multiple single-operations together and does not completely eliminate the round-trips between your application and the database.
With the bulk operations, as mentioned above, all data is brought from the client application into the database at one go. Once the data is on the server, it is then being processed together within the database (server), maximizing the performance.
The bulk operations can improve the performance by more than 90% when processing a large dataset.
Below are the items you may need to consider when to use the right operations (Bulk vs Batch).
- Network Latency
- No. of Columns
- Type of Data
Though there is no standard recommendation of when to use what, when using the library, we recommend to use the bulk operations if the datasets you are working is beyond 1000. Otherwhise, use the batch operations.