Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2001
    Posts
    2

    Unhappy Unanswered: Help: slow sp execution using job

    A scheduled job to execute a stored procedure to get data out of one table and insert into another blank table using cursor.
    Running this stored procedure in Query Analyzer takes 1.5 mins to finish, however, running a job with the exactly same execute command takes 1 hour to finish.
    Please help !!!!!

  2. #2
    Join Date
    Jul 2002
    Location
    India
    Posts
    13
    Why dont you create a DTS package to transfer the data between the tables and schedule the package
    Balaji

  3. #3
    Join Date
    Sep 2001
    Posts
    2
    Thanks. I never tried DTS. But I need some complicated logic to define the data partition I need to transfer before the data is transfered. I am not sure if DTS can include this logic by a programmable way in its process to set the transfer criteria.
    Regarding to the slow problem, I found the answer from someone else's post weeks ago. Basically, I put "set nocount on" in front of each exec and it speeded up the execution.

    Originally posted by pcmbalaji
    Why dont you create a DTS package to transfer the data between the tables and schedule the package

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •