SP performance slow when calling directly on server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mariuszb
    New Member
    • Nov 2007
    • 2

    SP performance slow when calling directly on server

    I use job executing stored procedures to get data for OLAP. All works fine except one thing: one of the procedures takes a few hours to complete. Executing procedure via remote desktop and query analyzer directly on the server gives the same behaviour.

    Same procedure executed from query analyzer/management studio from PC works fine - executes in about five minutes.

    SQL server 2k. SP has set nocount, estimated execution plans have same steps.

    SP gets data from different instance of sql on the same machine, then does a few updates, and finally inserts data to the table.

    What can cause such behaviour?
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    Does that involve any locks ?

    Comment

    • mariuszb
      New Member
      • Nov 2007
      • 2

      #3
      Originally posted by debasisdas
      Does that involve any locks ?
      Job was deadlocked once, so yes, locks are involved, but i didn't investigate it.

      Comment

      Working...