Sp & parameters

  • First time it took 2000msec and later it took 5000msec.

  • ramana3327 (5/31/2014)


    First time it took 2000msec and later it took 5000msec.

    If you want help with that, I recommend that you post the code and the execution plan.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • I need help but unfortunately I am unable to provide the execution plan and queries.

    I use with recompile option and send that execution time to them

  • Unfortunately the situation leaves us purely guessing, as far as we can tell, the first execution bulk loads million records and the next writes engraves them in Sanskrit.

    😎

  • Ok.

    If we forget about mine and come to the general situation. In usually what could be the possible reasons causes of high execution time if we execute SP immediately second time.

    I don't think the resources are not very difference fir the first & second time

  • ramana3327 (6/4/2014)


    Ok.

    If we forget about mine and come to the general situation. In usually what could be the possible reasons causes of high execution time if we execute SP immediately second time.

    I don't think the resources are not very difference fir the first & second time

    Well, this all depends on what is happening, the first execution could exhaust some resources or alter the target work set. If WITH RECOMPILE produces even worse results, it is not the optimizer reusing an obsolete plan. At least if the difference is in seconds. But then again, without more knowledge it is pure guessing.

    Certainly you can share IO statistics, execution plan directives (without details) and such?

    😎

  • Hi,

    I am still new to the SQL Server. So I want to know all your experiences.

    If you want send a report that the SP is taking this time and I did this fix so now it is taking this time, How can you do that?

    They mentioned that execute that sp with default parameters & with other parameters and test. For me each execution time is varying. So I sent the report by executing that original SP with recompile option and also modified Stored Proc with recompile option. And sent the both msg.

    Let me know, usually how you do to send the report?

  • ramana3327 (6/5/2014)


    Hi,

    I am still new to the SQL Server. So I want to know all your experiences.

    If you want send a report that the SP is taking this time and I did this fix so now it is taking this time, How can you do that?

    They mentioned that execute that sp with default parameters & with other parameters and test. For me each execution time is varying. So I sent the report by executing that original SP with recompile option and also modified Stored Proc with recompile option. And sent the both msg.

    Let me know, usually how you do to send the report?

    Start by grabbing a copy of Plan Explorer, it has Anonymize function, great for sharing execution plans without disclosing any sensitive information.

    To get the execution statistics, look up SET STATISTICS IO/TIME/PROFILE

    😎

  • ramana3327 (6/4/2014)


    Ok.

    If we forget about mine and come to the general situation. In usually what could be the possible reasons causes of high execution time if we execute SP immediately second time.

    I don't think the resources are not very difference fir the first & second time

    Maybe somebody started a transaction in SSMS and then went home.

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

Viewing 9 posts - 16 through 23 (of 23 total)

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