with (nolock) locking hint only applies to select commands so it has no impact on your update statements. Concurrent requests that are SELECTing from this view should still be performing "dirty" reads.EDIT:>>I'm willing to experiment if someone can tell me how to go about the investigation.Here is what I did to check it out:set nocount onuse pubscreate table junk1 (junk1id int primary key)create table junk11 (junk1id int primary key)gocreate table junk2 (junk1id int references junk1(junk1id), i int, v varchar(1), primary key (junk1id, i))create table junk22 (junk1id int references junk1(junk1id), i int, v varchar(1), primary key (junk1id, i))gocreate view junk_vNoLock asselect j1.junk1id, j2.i, j2.vfrom junk1 j1join junk2 j2 with (nolock) on j2.junk1id = j1.junk1idgocreate view junk_v2 asselect j1.junk1id, j2.i, j2.vfrom junk11 j1join junk22 j2 on j2.junk1id = j1.junk1idgoinsert junk1 values (1)insert junk2 values (1,1,'a')insert junk2 values (1,2,'a')insert junk11 values (1)insert junk22 values (1,1,'a')insert junk22 values (1,2,'a')/*-----------In another query window---------------------run this (without the rollback to lock the tables)begin tran update junk_vNoLock set v = 'b' where junk1id = 1 and i = 2 update junk_v2 set v = 'b' where junk1id = 1 and i = 2--rollback*/--this statement returns (not blocked)select * from junk_vNoLock--this statement is blockedselect * from junk_v2--Now rollback the transaction in the other windowgodrop view junk_vNoLockdrop view junk_v2godrop table junk2drop table junk22godrop table junk1drop table junk11
Be One with the OptimizerTG