Reputation: 7395
Can anybody advice me how to choose the best value for hibernate.jdbc.batch_size
?
If memory and CPU is not a problem, is it ok to use a value like 500?
In this chapter, it says to use a value between 10 and 50, but it didn't give a reason. Can anybody provide an explanation for this limitation?
Upvotes: 6
Views: 9023
Reputation: 691735
The Hibernate documentation recommends a value between 5 and 30. The best value is entirely dependent on your app, your data, your database. Try various values and measure the performance of each one.
Upvotes: 5