-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Bulkifying database operations
PostPosted: Wed Aug 13, 2008 6:39 am 
Newbie

Joined: Mon Feb 05, 2007 11:49 am
Posts: 13
Hello.

In an application I'm developing right now there are two very costly synchronization operation, one in which a lot of objects are created, and one in which a lot of objects are deleted. We are talking about thousands of sql insert and delete statements in each. Due to some performace commitments, these must be optimized.
What I would like to know is if there is way for me to intecept the barrage of statements that are going to be executed and try to bulkify those statements to see if performance improves, eg:

delete from sometable where someid = :id0
...
delete from sometable where someid = :id10000

and subtitute there for one or more

delete from some table where someid in (...)

I know that there are interceptor operations available in hibernate, but I don't know where in the flush lifecycle these occur. I also know that hibernate supports hql queries like the one above, but it would be more interesting to keep the flush lifecycle alive (for cascading purpuses) and the solution generic so as not to soil the existing code.

Thanks in advance,

Hugo Oliveira


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.