locked
Total IO time _reg RRS feed

  • Question

  • hi

    In sql server system tables we are having option to find elapsed time,total physical read,logical read and write and cpu time.I like to calculate total IO time taken by a query.In elapsed time the sorting process also includes.But i like to find Total IO time.If any one know, how to find this.please get back me.

    regards

    selva

    Wednesday, November 28, 2012 4:26 PM

Answers

  • Hello Selva,

    If I read your question correctly, you're looking for how long a query spent waiting for IO to complete? The only way to do this would be to do something like setup an extended events session for a particular session and then run the query on the session. If you're looking for overall IO based on queries and query time you could do some math with the colums in sys.dm_exec_query_stats. If neither of these are what you're asking about, could you please provide an example?

    -Sean


    Sean Gallardy | Blog | Twitter

    Wednesday, November 28, 2012 5:18 PM
    Answerer

All replies

  • Hello Selva,

    If I read your question correctly, you're looking for how long a query spent waiting for IO to complete? The only way to do this would be to do something like setup an extended events session for a particular session and then run the query on the session. If you're looking for overall IO based on queries and query time you could do some math with the colums in sys.dm_exec_query_stats. If neither of these are what you're asking about, could you please provide an example?

    -Sean


    Sean Gallardy | Blog | Twitter

    Wednesday, November 28, 2012 5:18 PM
    Answerer
  • Hi sean,

    Thanks for your response.In sql server system tables, we have option to find out elapsed time.But Elapsed time is not a total Io time.Because elapsed time includes sorting process.so i would like to find out Total Io time of statements.If you know how to find the Total Io time,please send me a query.

    With regards

    selva

    Tuesday, December 18, 2012 11:00 AM
  • Hi

     
    I can able to get total_elapsed_time from DMv sys.dm_exec_query_stats

    But total_elapsed_time= execution_time + io time + sorting time + parsing time

    This is my understanding , am i right?

    And at the same time i can able to get number of IO(physical_read, logical read, logical write ) for each query from the same dynamic view.

    Actually i like to know IO time for each query.

    Any one help me to clarify and get back to me where i can get IO time for each query.

    Wednesday, December 19, 2012 1:29 PM