Execution time difference when parameter is difference

  • My stored procedure has input parameter for branch id

    if I provide the small branch (no of record is 1000), it takes 3 sec

    if I provide the large branch (no of record is 100000), it takes 60 sec

    Any idea? And how to solve this issue

    Thanks

  • stephenhai (9/1/2010)


    My stored procedure has input parameter for branch id

    if I provide the small branch (no of record is 1000), it takes 3 sec

    if I provide the large branch (no of record is 100000), it takes 60 sec

    Any idea? And how to solve this issue

    Thanks

    Not enough information. Can you post the whole procedure?

    “Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden

  • Question .. when executing your stored procedure ... using SSMS ... select ... "Show execution plan". Clear CACHE between executions.

    Examine and compae the plans. This will assist you in identifying the differences.

    Come back and include the plans in your posting along with the table(s) definitions (including indexes), the text of the procedure and I am sure someone will then be able to provide you with further assistance.

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

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

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