raphy
unread,Dec 14, 2010, 3:07:15 PM12/14/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to nhusers
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)
I’ve come across NHibernate source code (2.1.2) and I’ve not find any
nolock word in whole solution ! I already know about
IsolationLevel.ReadUncommitted but ….
In Nhibernate I see a method called SetLockMode in the criteria API
(I’ve already tested this) , but I see no difference according to
lockmode I choose … (moreover, there is a nullexception when i use
setlockmode with no alias in a projection, i'll post late about this)
My question(s) are :
Except from doing sql-query, is there any way to issue a query that
doesn’t lock, in any way (read, update, etc…) the table ?
Maybe I already do sql queries that are OK, but I have no tool to
verify this ; I’ve used NHProf, but I don’t see anything concerning
locks.
Another thing is projections. I’ve managed to use projections on
server side (we have a pretty complex object graph (about 5 levels …))
to do slight select ; can I use something like this for my updates ?
Thank you all !
Raphy