| title | @@TOTAL_READ (Transact-SQL) | |||||
|---|---|---|---|---|---|---|
| description | @@TOTAL_READ (Transact-SQL) | |||||
| author | MikeRayMSFT | |||||
| ms.author | mikeray | |||||
| ms.date | 09/17/2017 | |||||
| ms.service | sql | |||||
| ms.subservice | t-sql | |||||
| ms.topic | reference | |||||
| f1_keywords |
|
|||||
| helpviewer_keywords |
|
|||||
| dev_langs |
|
[!INCLUDE SQL Server Azure SQL Managed Instance]
Returns the number of disk reads, not cache reads, by [!INCLUDEssNoVersion] since [!INCLUDEssNoVersion] was last started.
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions
@@TOTAL_READ
integer
To display a report containing several [!INCLUDEssNoVersion] statistics, including read and write activity, run sp_monitor.
The following example shows returning the total number of disk read and writes as of the current date and time.
SELECT @@TOTAL_READ AS 'Reads', @@TOTAL_WRITE AS 'Writes', GETDATE() AS 'As of'; [!INCLUDEssResult]
Reads Writes As of
----------- ----------- ----------------------
7760 97263 12/5/2006 10:23:00 PM
sp_monitor (Transact-SQL)
System Statistical Functions (Transact-SQL)
@@TOTAL_WRITE (Transact-SQL)