Home Forums SQL Server 2008 T-SQL (SS2K8) somtimes 'SELeCT getdate()' takes 5 sec to complete RE: somtimes 'SELeCT getdate()' takes 5 sec to complete

  • There can be a thousand reasons. CPU is occasionally pegged to the wall. I/O is occasion pegged to the wall. The "pipe" is occasionally full. Auto-negotiate or half-duplex or both have been setup on a switch or router somewhere in the pipe. The machine you're running it from has a problem with all the windows you have open. They forgot to turn off interactive virus scan. The "pipe" has a bad connection somewhere. The server or your desktop doesn't have enough memory or a chip may be going bad. Some idiot in your company decided to watch streaming video instead of working. A massive deadlock or long duration blocking is occurring. It's a Monday cleverly disguised as a Tuesday. Etc, etc, etc.

    The bottom line is that there could be a serious problem and someone needs to start looking into it. 😉

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