Why reads is always 0?

  • Another silly question - why my profiler is always showing up reads=0 (no matter what kind of trace I am running)?

    Note - the DB server is a dedicated for sql server only - there are no any other services running on it - just sqls2k sp3a (not even report or analysis services) over win 2003 server...

  • Profiler displays the physical reads. The first time you run a query, SQL Server retrieves data from disk, and places them in the buffer cache. These disk (physical) reads show up in Profiler. Subsequent queries, which retrieve the same data, will read from the buffer cache (logical reads). Since no physical reads are involved, the reads in profiler show up as 0, or greatly reduced values.

    You could clear the buffer cache before each query, by running DBCC DROPCLEANBUFERS, so that you get comparable 'reads' values for each query.

    Or you could run SET STATISTICS IO ON in Query Analyzer/SSMS, and run your queries. SQL Server then displays the logical reads and physical reads involved for each query. The logical reads can be used for comparison.

    SQL BAK Explorer - read SQL Server backup file details without SQL Server.
    Supports backup files created with SQL Server 2005 up to SQL Server 2017.

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

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