DBCC DropClean Buffers

  •  The same query i have put in administration section also....

    Hai

    I was trying to analyse the IO read of a query.

    i have executed the following query

    Set statistics io on

    select * from corpbonds

    set statistics io off

    and i got the message :

    Table 'CorpBonds'. Scan count 1, logical reads 21, physical reads 0, read-ahead reads 0.

    means that no physical read and the data is taken from the cache.

    After this i cleared the buffer cache

    dbcc dropcleanbuffers

    executed the same query and i got the same message like:

    Table 'CorpBonds'. Scan count 1, logical reads 21, physical reads 0, read-ahead reads 0.

    What is means, according to my knowledge after clearing the cache the query should take the data from the disk and hence the Phycal read should be greater that zero right ?

    Can anybody explain this?


    subban

  • dbcc dropcleanbuffers only drops clean buffer. But if you modified or inserted data before you run the test, the dirty pages may still in the buffer.

     

    You can run CHECKPOINT after the dbcc dropcleanbuffers, then try your test

     

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

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