patternsqlMinor
Does SQL Server prioritize select and update statements?
Viewed 0 times
updatesqlstatementsanddoesserverselectprioritize
Problem
Assume that SQL Server received both select and update statements to the same table at the same time
Do any of them get prioritized? I know that select statements are delayed until update completed. If table lock continue for a long time due to update, select statement gets cancelled with too much waiting error
So what happens when both received at the same time?
Do any of them get prioritized? I know that select statements are delayed until update completed. If table lock continue for a long time due to update, select statement gets cancelled with too much waiting error
So what happens when both received at the same time?
Solution
There is no priority in SQL Server for commands which ever comes first would be executed first. There would always be
nanosecond/microsecond difference, of course you would not be able to notice it.Context
StackExchange Database Administrators Q#107800, answer score: 7
Revisions (0)
No revisions yet.