March 27, 2014 at 3:32 pm
I have 2 different tables i.e. TABLE A and TABLE B . Activity on these tables is updating column values.However, due to this Locking is noticed and cause time outs? Any ideas?
Thanks
March 27, 2014 at 5:30 pm
Can you provide further information? What is being blocked?
______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience
March 27, 2014 at 5:44 pm
Locking is a natural DB phenomenon. You should be worried more about blocking. Provide more details ..
--
SQLBuddy
March 27, 2014 at 5:44 pm
Lets consider 2 different tables TABLE A and TABLE B.Now, suppose that there are two different sessions with different activity. Does one of the session will be blocked or timed out?
Let me know if you still have questions?
March 27, 2014 at 10:21 pm
if both differnt sessions/ activities are going to update both tables TableA and TableB, then ofcourse locking will heppan. based on number of rows, DB isolation level, processing time of each session may end up blocking, as well.
Avi.
March 27, 2014 at 10:29 pm
Admingod (3/27/2014)
Lets consider 2 different tables TABLE A and TABLE B.Now, suppose that there are two different sessions with different activity. Does one of the session will be blocked or timed out?Let me know if you still have questions?
If the code is written correctly and the table/indexes are designed correctly, the blocking will be so short that it doesn't matter and you won't get a time out.
--Jeff Moden
Change is inevitable... Change for the better is not.
March 27, 2014 at 11:52 pm
Admingod (3/27/2014)
Lets consider 2 different tables TABLE A and TABLE B.Now, suppose that there are two different sessions with different activity. Does one of the session will be blocked or timed out?Let me know if you still have questions?
Is this a general question or an issue that you are having ?
--
SQLBuddy
March 28, 2014 at 4:37 am
The key is to make your queries run as fast as possible and keep the transactions as short as possible. So, if you're running an UPDATE statement, make sure it's using a WHERE clause and that there is an index for the WHERE clause to find the data really fast. But, if you don't have one, it will take longer and longer to access the table.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply