Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using WITH syntax
Message
From
09/10/2014 11:13:50
 
 
To
09/10/2014 11:07:15
General information
Forum:
Microsoft SQL Server
Category:
Indexing
Environment versions
SQL Server:
SQL Server 2012
Application:
Web
Miscellaneous
Thread ID:
01609055
Message ID:
01609056
Views:
38
>When we use the WITH syntax to force a query to use a specific index, we cannot use the NOLOCK option. This means it opens the door to SQL Server to lock something during the query. Is there a way to force the NOLOCK to be in effect? I have this option at 100% in my queries. Before that, we had problems.

Michel,

You can do this...

WITH (NOLOCK, INDEX (MyIndex))

I'm not sure I'd advise using this approach in production - more of a design issue than anything else. But I think that syntax will work.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform