Skip to content

Latest commit

 

History

History
61 lines (48 loc) · 2.07 KB

total-read-transact-sql.md

File metadata and controls

61 lines (48 loc) · 2.07 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs
@@TOTAL_READ (Transact-SQL)
@@TOTAL_READ (Transact-SQL)
MikeRayMSFT
mikeray
09/17/2017
sql
t-sql
reference
@@TOTAL_READ_TSQL
@@TOTAL_READ
number of disk reads
disks [SQL Server], number of disk reads
@@TOTAL_READ function
total read [SQL Server]
read activity since last started
TSQL

@@TOTAL_READ (Transact-SQL)

[!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

Syntax

@@TOTAL_READ  

Return Types

integer

Remarks

To display a report containing several [!INCLUDEssNoVersion] statistics, including read and write activity, run sp_monitor.

Examples

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   

See Also

sp_monitor (Transact-SQL)
System Statistical Functions (Transact-SQL)
@@TOTAL_WRITE (Transact-SQL)