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
|