Re: Why running the same query after the first time is faster ?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Louis Davidson (dr_dontspamme_sql_at_hotmail.com)
Date: 12/10/04


Date: Thu, 9 Dec 2004 23:47:45 -0500

Maybe, but I doubt he has enough cache on his disk if it is a large data
set. The other problem might be the query plan. It might take some time to
calculate that too:

DBCC FREEPROCCACHE

You could clear the disk cache by doing a different query. There are quite
a few cache locations to consider :)

-- 
----------------------------------------------------------------------------
Louis Davidson - drsql@hotmail.com
SQL Server MVP
Compass Technology Management - www.compass.net
Pro SQL Server 2000 Database Design - 
http://www.apress.com/book/bookDisplay.html?bID=266
Note: Please reply to the newsgroups only unless you are interested in 
consulting services.  All other replies may be ignored :)
"Michael C" <mculley@NOSPAMoptushome.com.au> wrote in message 
news:O2m8kUm3EHA.1404@TK2MSFTNGP11.phx.gbl...
> "Louis Davidson" <dr_dontspamme_sql@hotmail.com> wrote in message 
> news:uYzmb5l3EHA.3380@TK2MSFTNGP09.phx.gbl...
>> Most likely it is cache, as Michael said.  If you want to prove it, run:
>>
>> DBCC DROPCLEANBUFFERS
>>
>> to clear the cache and try it again.
>
> Maybe disk caching would cause it to run faster anyway?
>
> Michael
> 


Relevant Pages

  • Re: Caching control
    ... |> | invalidate/unmap them in order to discard the data from memory. ... |> writing out to disk. ... | easy to discard as clean disk cache. ... stating that a specific amount of RAM can be used only for I/O ...
    (comp.os.linux.development.system)
  • PROBLEM: sata_sil24 lockups under heavy i/o
    ... a total of 4) and started heavy i/o (extending a software raid5 device) ... system recovers the disk transfer speed is reduced from UDMA/100 to ... Cache Line Size: 32 bytes ... parport_pc: Current parallel port base: 0x378 ...
    (Linux-Kernel)
  • Re: Scheduler: Process priority fed back to parent?
    ... Mac OS X has a special cache ... on disk of things that get loaded on boot. ... >>initial priority is a guess, and isn't set until the priority info has ... This prefetch activity could be turned on/off ...
    (Linux-Kernel)
  • Re: Pull request for FS-Cache, including NFS patches
    ... Would a disk cache on SSD make any sense? ... including NFS patches ... Allow you to reduce the latency of slow network links by diverting ...
    (Linux-Kernel)
  • Re: 2 questions: IWP, and indexing
    ... using GTRR script steps in the web interface. ... I have a portal on the student layout that shows enrollment ... "Flush Cache to Disk performs an immediate flush of the FileMaker Pro ...
    (comp.databases.filemaker)