intergyDev
New Member
Hello, I have built a simple UI that gets data for each table in our database using _TableStat and displays the reads, creates, and deletes since the DB started, and also the numbers since you last ran the tool (basically recentReads, recentCreates, and recentDeletes).
We took it a step further and are showing the Indexes for each table, and getting data from _IndexStat for each Index so we can try to match up the Index with reads when a procedure is run (We use XRef, but for dynamic queries, we need a runtime analysis, not compile time).
We are seeing some interesting results that I was hoping someone might be able to explain. We were expecting that the sum of reads for all Indexes for a table would equal the reads from _TableStat, but it doesnt always seem to be the case. Sometimes we'll see 2 reads for a table, and 0 Index reads. Sometimes we'll see 20 reads, and 170 Index reads.
Can someone provide some knowledge on how to use _IndexStat in conjunction with _TableStat, and if the numbers should match up, or if there is something I am not understanding?
We took it a step further and are showing the Indexes for each table, and getting data from _IndexStat for each Index so we can try to match up the Index with reads when a procedure is run (We use XRef, but for dynamic queries, we need a runtime analysis, not compile time).
We are seeing some interesting results that I was hoping someone might be able to explain. We were expecting that the sum of reads for all Indexes for a table would equal the reads from _TableStat, but it doesnt always seem to be the case. Sometimes we'll see 2 reads for a table, and 0 Index reads. Sometimes we'll see 20 reads, and 170 Index reads.
Can someone provide some knowledge on how to use _IndexStat in conjunction with _TableStat, and if the numbers should match up, or if there is something I am not understanding?