How to calculate the response for sql query

  • Hi,

    I try to display the progress bar when viewing the report. I need a way to find out how long the query will take. What is the best approaches to do this?

    Thanks in advance.

    Jimmy

  • There's no way to know this. You could guess, but even the optimizer doesn't know how long. It can guess, but it's just that.

  • Even Microsoft seems to have abandoned trying to make progress bars indicate how long something is going to take.

    Go with a spinning wheel or something that just indicates that it is running. If you have a nice enough animated gif, users think things take less time. I have used a gif of a puppy running around wagging it's tail and gotten reports of things running much faster without any reduction in time it takes to actually run.

  • Heh... if you write the query right, you won't need a progress bar... it'll just be done.

    --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)

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

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