Time Consuming

  • Hi All,

    I have an Stored procedure to schedule the users for an test,If i want to schedule 40000 users i will pass their user Ids(an input parameter) in comma separated values like '677,8899,999.......n'

    Problem is:

    For first 2000 users its taking around 3 mins

    and for next 2000 users its taking 8 mins

    and its taking more time as it precedes

    and i checked whether its of logical reads or scan count

    but i found with that statistics for first 2000 users and last 2000 users resulted the same

    Can anyone resolve/suggest for this issue

    Thanks in Advance

  • Post your SP and table definations

  • Sorry ,I dont have privilage for doing that.

    but i can say there are table variables and temporary tables

  • Without seeing the code, it's very, very hard to give any useful advice.

    Watch out for the lack of statistics on table variables. you're probably getting bad execution plans as a result.

    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
  • If you're using a c.u.r.s.o.r. within your sproc to process the data then this might be a possible cause, too...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • Is there a reason you can't post the code? I can understand data being a problem, but scheduling code?

Viewing 6 posts - 1 through 5 (of 5 total)

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