All,

We seem to be having a delay problem when we attempt to update 500+
entities to the database during a single session flush.
The session still ends up updating the database correctly, but it
takes a few minutes to do so.

We traced the session and we have narrowed down the problem  i.e. see
the following trace lines which have been extracted from the log file:

2010-03-12 14:17:35,046 INFO SELECT ...
2010-03-12 14:17:35,171 DEBUG Hydrating entity: starts
2010-03-12 14:17:35,373 DEBUG done processing result set (592 rows)
2010-03-12 14:17:35,389 DEBUG resolving associations for
2010-03-12 14:17:35,545 DEBUG aggressively releasing database connection
2010-03-12 14:19:09,558 DEBUG flushing session
2010-03-12 14:19:09,558 DEBUG dirty checking collections
2010-03-12 14:19:09,636 DEBUG Flushed: 0 insertions, 592 updates, 0
deletions to 593 objects
2010-03-12 14:19:09,667 DEBUG executing flush
      <<592 Updates performed in here>>
2010-03-12 14:19:12,193 DEBUG post flush
2010-03-12 14:19:12,193 DEBUG closing session
2010-03-12 14:19:12,193 DEBUG running BatcherImpl.Dispose(true)

Note that it takes over 90 seconds between these two lines:
2010-03-12 14:17:35,545 DEBUG aggressively releasing database connection
2010-03-12 14:19:09,558 DEBUG flushing session

We have implemented our own unit of work implementation where we:

Create a session via the session factory (this.c_sessionFactory.OpenSession())
Session.Flush();
Session.Close();

Note that we do not use session transactions as the table that is
updated cannot be locked for a long time, so instead we are using the
session.flush() default behaviour.

On a last point of note, the entity has an Id that is "assigned".

Anybody now what the problem is - or any pointers in the right direction?

Cheers,
Billy

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to