[hibernate-dev] Configuration to support batching (or sorting) of DELETE statements efficiently

Madhusudana Reddy Sunnapu smreddy2004 at gmail.com
Wed Jan 27 00:01:36 EST 2016


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-hibernate/
)

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.


More information about the hibernate-dev mailing list