0

From the link: http://www.databasejournal.com/features/mssql/article.php/2244381/Examining-SQL-Servers-IO-Statistics.htm

I got the query

-- Take a look at raw I/O Statistics
SELECT @@TOTAL_READ [Total Reads]
     , @@TOTAL_WRITE as [Total Writes]
     , CAST(@@IO_BUSY as FLOAT) * @@TIMETICKS / 1000000.0 as [IO Sec]
GO

(Results)

Total Reads Total Writes IO Sec  
----------- ------------ ----------- 
      85336       322109      25.375

How do I get this but this time I can have date filters? i.e.

where
xDate between Date1 and Date2

?

@Note :

This is different from question How to find out SQL Server table's read/write statistics with Date Filter? as this is the TOTAL and the other is per TABLE

Community
  • 1
  • 1
Philip Morris
  • 459
  • 1
  • 9
  • 26
  • Possible duplicate of [How to find out SQL Server table's read/write statistics with Date Filter?](http://stackoverflow.com/questions/36912343/how-to-find-out-sql-server-tables-read-write-statistics-with-date-filter) – Rich Benner Apr 28 '16 at 10:52
  • @RichBenner this one is total and the other is per table – Philip Morris Apr 28 '16 at 10:54
  • All the statistics are current. No, there is no way to provide date range filter to any of this kind of statistics. – James Z Apr 29 '16 at 03:43

1 Answers1

1

You would have to take periodic snapshots and compare them over time to be able to do what you're asking for.

Ben Thul
  • 31,080
  • 4
  • 45
  • 68