You can do perform a query that is equivalent to adding nolock by
using the following:

using (var transaction =
session.BeginTransaction(IsolationLevel.ReadUncommitted)) {
.. query here
}

On Dec 14, 4:51 pm, Oskar Berggren <[email protected]> wrote:
> 2010/12/14 raphy <[email protected]>:
>
> > I use NHibernate since 2 years now, I’ve pretty always managed to do
> > what I want, but now, I’m stuck !
>
> > Our app is in production since February, and now we’re having
> > performance problem.
>
> > One of our developer here told us to try to add nolock hints to our
> > sql queries issued by NHibernate. (We use a MSSQL 2008 db)
>
> This seems a bit trial-and-errorish... Do you actually know which
> query or update is causing the problem, or do you just want to
> experiment?
>
> With nolock you may see uncommitted transactions it seems. Is that
> really acceptable?
>
> Maybe the READ_COMMITTED_SNAPSHOT database option is interesting?
> Seehttp://msdn.microsoft.com/en-us/library/ms188277.aspx
>
> /Oskar

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