By setting STATISTICS IO ON, I get valuable information about the amount of I/O performed on each table in my query. Is there a way to store this information for each statement run, even if the statement isn't issued from my Query Analyzer window? Aside from splitting each of my tables into a separate filegroup and running the fn_virtualfilestats() system table-valued function to get I/O statistics, is there a way to calculate simple I/O values for my tables? Essentially, I want something like a trace flag that I can set so that SQL Server will store this information, letting me analyze it and better understand my object I/O utilization.

Your best bet for gathering I/O information and saving it for analysis is to create a SQL Server Profiler trace to capture this information. You can then load the trace file into a table for easy querying and analysis. (To learn how to create a Profiler trace, see Steven Berringer's article "9 Steps to an Automated Trace," InstantDoc ID 43014, or search on the keyword Profiler from http://www.sqlmag.com.)

End of Article




You must log on before posting a comment.

If you don't have a username & password, please register now.

Reader Comments

I would like to change my user id and password. How do I do that? my email address is sgw@inel.gov

sharol

Article Rating 1 out of 5

You didn't answer his question. What he wants is to know is the amount of IO occuring per object (as set statistics io does), there doesn't seem to be a way to do this in Profiler.

vanders

Article Rating 1 out of 5