Hi Jacob
Greetings!!!
I have multiple update statements like below in stored procedures.
UPDATE T3 SET PID = S2.PIDFROM S1, S2WHERE S1.PID = S2.PIDAND S2.PID IN ('ABC','RFZ')
The stored procedure execution takes 43 mins.
Do we have any alternate method to update a table without using UPDATE statement?
Could you please suggest me any such possibility.
Note: I am working on SQL Server 2005.
Best Regards
Sunny
SQL Server Update
Hi Sunny
The UPDATE statement is the only statement that you can use for updating existing values on a table. So there is no alternative. I understand that your problem is not with the UPDATE statement, but with the delay it takes to complete the execution.
Do you have a PK/FK relationship between the tables? It is difficult to say what is causing the delay without looking at the details. Can you post the schema of those two tables? Also, if you can take the execution plan in text format and post, will be helpful.
Also how do you relate T3 with other tables? I dont see any relations. If you properly relate, it can speed up the query
Can you post the table structures ?
Managed Windows Shared Hosting by OrcsWeb