Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 A tricky/complicated question ?

Author  Topic 

Bill_C
Constraint Violating Yak Guru

299 Posts

Posted - 2012-06-19 : 03:34:51
A question for you buffs

How and Where does sql server store the 'hits' against each table for queries run against them?

I know that the following tables exist holding some of the data:-
sys.dm_db_missing_index_groups
sys.dm_db_missing_index_group_stats
sys.dm_db_missing_index_details

But does anyone know how they are populated? Is it an internal algorythm/code or whatever which is unavailable to us or is there a way we can interrogate this ourselves as I would like to find out how they measure the hits against each field for every query so maybe i could then use this for my own purpose.
Is this recorded anywhere?

Thanks

Sachin.Nand

2937 Posts

Posted - 2012-06-19 : 04:44:45
Well its a wild guess.Maybe sql server tracks it down from the cached execution plans and suggests the missing indexes.

Only free men can negotiate..
Go to Top of Page

Bill_C
Constraint Violating Yak Guru

299 Posts

Posted - 2012-06-19 : 05:11:34
Thanks for your input, all welcome as this intrigues me,
If that is the case, would the cached area be accessable (temp table, wiped on restart)?
I would think the fields hit on each query must be recorded somewhere and the number of times they are hit to be able to be recorded, the queries run surely must be stored somewhere to run stats on them.
Go to Top of Page
   

- Advertisement -