Hi Jason,
Thanks for your reply. I agree that sessions should not be used across
multiple threads. Infact in my WinForm app I am using only a single
thread. But I couldn't understand how the NUnit GUI was doing so.
Batching :- I have no other option but to use Identity. Cannot change
Database structure :).
Large Data :- I tried everything including stateless session but did
not get any significant improvement. So at the end I just followed
Ayende's blog http://ayende.com/blog/4137/nhibernate-perf-tricks step
by step and bingo --- Got the 9000 rows inserted in just 3 seconds
from my WinForm app. Ayende rocks man...
On Dec 23, 9:21 pm, Jason Meckley <[email protected]> wrote:
> sessions are not thread safe and therefore should not be shared across
> multiple threads. 1 session per thread.
> this should handle the NHProf alert.
>
> Batching:
> what POID are you using? you cannot take advantage of Batching using
> Identity, only hilo, guid and guid.comb.
>
> Large sets of data:
> NH is designed to work with small object graphs within a transaction.
> loading 8K records using ISession means 8000 entities are stored in the
> identity map, until the session is disposed. that's a huge amount of
> memory. At a minimum use IStatelessSession, but even then I wouldn't use NH
> for this type of operation at all.
> what you describe is better suited for ETL (extract transform load).
> Rhino.Etl (oss) and SSIS (MS) are the two etl tools I'm aware of.

-- 
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