Hi,
Hibernate provides simple configuration properties to enable batch inserts
and updates using "hibernate.order_inserts" and
"hibernate.order_updates"
respectively. These setting allow hibernate to sort the insert and update
statements and process them in batches efficiently.
But we don't have such a configuration to sort or batch delete statements
efficiently. Especially with CascadeType.DELETE we can see that delete
statements are not batched effectively and could result in extra network
calls to the database for deletion.(Refer:
http://vladmihalcea.com/2015/03/26/how-to-batch-delete-statements-with-hi...
)
So I am thinking wouldn't it be a good feature to have hibernate support
similar configuration, say "hibernate.order_deletes", to enable batch
deletes similar to updates and inserts.
Cheers,
Madhu.