SQL Server Performance

I/O Time

Discussion in 'SQL Server 2005 General Developer Questions' started by sql_jr, Jan 15, 2009.

  1. sql_jr New Member

    Hi, I'm using the following script to get infor about I/O. The Percent I/O time is overall usage on the server. What is considered a high I/O time usage %, and is the below an accurate picture of same? TIA DECLARE
    @SecFromStart bigint
    @SecFromStart = DATEDIFF(s, dbo.udf_SQL_StartDT(), getdate())SELECT CAST(CAST(@@TOTAL_READ as Numeric (18,2))/@SecFromStart
    as Numeric (18,2)) as [Reads/Sec] , CAST(CAST(@@TOTAL_WRITE as Numeric (18,2))/@SecFromStart
    as Numeric (18,2)) as [Writes/Sec], CAST(@@IO_BUSY as Numeric (18,2)) * @@TIMETICKS/10000.0/@SecFromStart
    as Numeric (18,2)) as [Percent I/O Time]
    The function referred to is:CREATE
    FUNCTION dbo.udf_SQL_StartDT ()AS
    DECLARE @WorkingVariable datetimeSELECT @WorkingVariable = login_time FROM master..sysprocesses
    Return @WorkingVariableEND
  2. satya Moderator

Share This Page