Home Forums SQL Server 2008 SQL Server 2008 - General Procedure is taking 15 seconds after service restart but from second time procedure takes 1 sec RE: Procedure is taking 15 seconds after service restart but from second time procedure takes 1 sec

  • GilaMonster (1/24/2013)


    Very likely has nothing whatsoever to do with the execution plan. 15 seconds is far longer than SQL takes to compile anything other than a ridiculously complex query.

    Restarting cleared the data cache, the cache of data pages. After the restart queries have to read the data from disk (slow), not cache (fast). Hence the first run of any query will be slower than the second or third or subsequent runs

    +10

    1st Run = Disk --> RAM --> Client

    2nd Run = RAM --> Client

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]