IO Statistics

  • I am trying to produce some IO statistics for one of my SQL Server DBS. For that I am using the following query

    SELECT * FROM fn_virtualfilestats(NULL,NULL);

    Ofcourse it works n throws me results like

    DbId FileIdAVG READS AVG BYTES READAVG WRITES

    6myDatabase160826426613362356224032381493

    6myDatabase22385872 40533474662417148603

    But i dont know what is the time stamp.

    Like if on file 2 of DBID 6 if we have 2385872 reads..

    Are these reads per day ? minute ? year ?

    Please help.

    [font="Verdana"]
    Today is the tomorrow you worried about yesterday:-)
    [/font]

  • From BOL:

    Returns I/O statistics for database files, including log files. In SQL Server, this information is also available from the sys.dm_io_virtual_file_stats dynamic management view.

    DMV's are generally populated since the last time the service was restarted. There are other things that can cause the data to be flushed and start again, but as a general rule service restarts.

    An easy way to find out how long your instance has been up is to query the create data of tempDB as this is recreated avarytime the service starts.

    Hope this helps,
    Rich

    [p]
    [/p]

  • Thank You Richard it was useful.

    [font="Verdana"]
    Today is the tomorrow you worried about yesterday:-)
    [/font]

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

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