question

msp avatar image
msp asked

set query priority

Hi, how can i set priority to run queries.fore example i have 2 select , 1 update , 1 insert commands from many users , and i want set priority to run queries in sqlserver ( first inserts , second updates , ... and last selects commands )
query
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Wimbush avatar image David Wimbush commented ·
I'm afraid it doesn't work like that. Are you experiencing some problems? What are you trying to fix with this?
0 Likes 0 ·

1 Answer

·
Grant Fritchey avatar image
Grant Fritchey answered
That's absolutely not how locking within SQL Server works. You can look at using an isolation level like [READ COMMITTED SNAPSHOT][1] as a mechanism to prevent reads from interfering with writes. That's the best approach. [1]: https://msdn.microsoft.com/en-us/library/tcbchxcb(v=vs.110).aspx
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.