UPDATE Query gets stuck as a part of the procedure but completes fine when run independently

  • One of the update query which updates a column after joining records from seven tables gets stuck indefinitely when it is running as a part of stored procedure but it completes fine within a minute when i kill the spid of the procedure and run it again manually. Any pointers?

  • Can you post the procedure?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Your post does not give much details. Do you mean that you first run the stored procedure and it gets stuck on an UPDATE statement. Then you kill the execution of the procedure and then run you the UPDATE statement directly outside the procedure? Or did you first run the procedure from the application, killed the spid, and then ran the procedure directly from SSMS?

    In either case, this article on my web site may explain some things for you: http://www.sommarskog.se/query-plan-mysteries.html

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply