SQL @@TOTAL_READ

SQL @@TOTAL_READ Statistical Function returns the total number of disk reads since the last time the SQL server started. Remember, this does not include cache reads. The syntax of the @@TOTAL_READ is

@@TOTAL_READ

SQL @@TOTAL_READ Example

The below code snippet shows you the total number of disk reads for this SQL Server.

-- SQL Server @@TOTAL_READ Example
SELECT @@TOTAL_READ AS [Total Number of Reads]
SQL @@TOTAL_READ Example 1

You can use the GETDATE() function along with Total_Read function to see the total number of reads until today.

-- SQL Server @@TOTAL_READ  Example
SELECT @@TOTAL_READ AS [Total Number of Reads],
	GETDATE() AS [As of Today]
SQL @@TOTAL_READ Example 2

@@TOTAL_READ Example 2

In this Sql Server @@total_read example, we are using both the Total Reads and Total Writes, along with Today’s date

-- SQL Server @@TOTAL_READ  Example
SELECT @@TOTAL_READ AS [Total Number of Reads],
	 @@TOTAL_WRITE AS [Total Number of Writes],
	 GETDATE() AS [As of Today]
SQL @@TOTAL_READ Example 3