IO Statistics

  • Can someone please suggest me a way to gather the IO statistics of just one query in a sproc? This query consists of lot of temp tables and table variables because of which i am not able to run the query seperatly.

    I tried creating physical tables for each of the temp table and table variable along with the data and execute the query. But i am not sure whether this approach will give correct values as i am going to use physical table instead of temp tables.

  • If I understand the question, you can this to your code

    ...

    --Previous parts of a procedure

    SET STATISTICS IO ON;

    EXEC something;

    SET STATISTICS IO OFF;

    --The rest of the procedure

    ...

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply