Skip to content

Latest commit

 

History

History
65 lines (51 loc) · 2.23 KB

File metadata and controls

65 lines (51 loc) · 2.23 KB
title @@TOTAL_READ (Transact-SQL) | Microsoft Docs
ms.custom
ms.date 09/17/2017
ms.prod sql
ms.prod_service sql-database
ms.reviewer
ms.technology t-sql
ms.topic language-reference
f1_keywords
@@TOTAL_READ_TSQL
@@TOTAL_READ
dev_langs
TSQL
helpviewer_keywords
number of disk reads
disks [SQL Server], number of disk reads
@@TOTAL_READ function
total read [SQL Server]
read activity since last started
ms.assetid b505fbe9-9569-4f3d-80b9-b64b5109ac98
author MikeRayMSFT
ms.author mikeray

@@TOTAL_READ (Transact-SQL)

[!INCLUDEtsql-appliesto-ss2008-xxxx-xxxx-xxx-md]

Returns the number of disk reads, not cache reads, by [!INCLUDEssNoVersion] since [!INCLUDEssNoVersion] was last started.

Topic link icon 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)