NH give you various ways with better performance.1) IQuery.ExecuteUpdate
but, so far, is supported only for SQL queries.
2) sessionFactory.OpenStatelessSession()
The option 2 is, probably, what you need. After use it please post here the
result ;)
2008/10/11 Pedro Santos <[EMAIL PROTECTED]>
>
> Hello,
>
> I have a batch job that does something like:
>
> for(;;){
> IList list = LoadSomething();
> ...
> Update(obj1);
> Update(obj2);
> Update(obj3);
> Flush();
> }
>
> I do know that the objects to update don't have any dirty relations, I
> just need to store them simple and fast. I've noticed on the NH logs
> that NHibernate does a lot of actions. We did some tests and the NH
> Flush takes about 60ms, while a single straight sql update command
> would take 15ms.
>
> Can I have some advice on the best way to make this job perform
> faster? And any other general guidelines on this example?
>
> Thank you.
>
> --
> Pedro Santos
> Home - http://psantos.zi-yu.com
> Work - http://www.pdmfc.com
> The future - http://www.orionsbelt.eu
>
> >
>
--
Fabio Maulo
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---