Re: [Hibernate] bad performance during flush and help is needed.

2003-09-13 Thread Patrick Burleson
At 08:15 PM 9/12/2003 +1000, Gavin King wrote: Forget about the 500 transactions. The problem is this: with 300-500 objects in the session cache, a single transaction( with an single object inserted) takes about one second. It simply does *not* take a second to dirty check 500 objects, dude.

Re: [Hibernate] bad performance during flush and help is needed.

2003-09-12 Thread Gavin King
So, let me get this straight: you, *500 times* (a) obtain a new JDBC connection (b) start a transaction (c) do some work (d) commit the transaction and close the JDBC connection and you are surprised that this is slow?? Why would you not do it all in one transaction? Starting and stopping

Re: [Hibernate] bad performance during flush and help is needed.

2003-09-12 Thread Josh Rehman
jiesheng zhang wrote: Forget about the 500 transactions. The problem is this: with 300-500 objects in the session cache, a single transaction( with an single object inserted) takes about one second. How long does a single transaction take in raw JDBC? I agree with Gavin's implicit suggestion

Re: [Hibernate] bad performance during flush and help is needed.

2003-09-12 Thread Gavin King
Forget about the 500 transactions. The problem is this: with 300-500 objects in the session cache, a single transaction( with an single object inserted) takes about one second. It simply does *not* take a second to dirty check 500 objects, dude. Nowhere even close. If you think you can prove

Re: [Hibernate] bad performance during flush and help is needed.

2003-09-11 Thread Gavin King
the transaction. My code is like this Tranaction tx=sessiob.beginTransaction(); foo.setField(newValue); tx.commit(); Well, obviously it is not like that, since that code does not load any objects into the session. 1. When the commit() is called, will the hibernate loop through every object in