SQL Server Performance

Calculating the IO the Stored proc consumed...

Discussion in 'SQL Server 2005 T-SQL Performance Tuning' started by Avnish, Apr 4, 2008.

  1. Avnish New Member

    Hi,
    I am running a stored proc that is using UDFs. When I try to see the statistics by SET STATISTICS ON.
    It is not giving me the values for tables used in UDFs. So how can i see the how much(Total) IO Or Reads is done on executing the stored proc.
    Thanks!!
  2. jst1699 New Member

    If you have rights then try SQL Profiler, with the SP:StmtCompleted event on.
    that will give u the total reads for the udf, but won't break it down by table (like stats IO via the query window).
    note - filter on SPID, as you don't want to capture activity from other sprocs.
  3. Avnish New Member

    Hi,
    thanks fo reply, I donot have rights for SQL Profiler and other way to get that ?
    thanks in advance
  4. madhuottapalam New Member

    open a query analyser and run
    SET STATISTICS IO ON;GOExec yourspGOSET STATISTICS IO OFF;GO
    Madhu

Share This Page