Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Looking to select last time tables were queried Expand / Collapse
Author
Message
Posted Monday, February 25, 2013 8:09 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 1:58 PM
Points: 41,513, Visits: 34,428
Sean Lange (2/25/2013)
That only shows index usage. If your queries are not sargable or you have a heap your results may not be exactly what you are looking for.


A scan is a use of an index, and the index usage DMV does include heaps and clusters. SELECT * from HeapTable will put an entry in that DMV.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1423630
Posted Monday, February 25, 2013 8:17 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Today @ 9:06 AM
Points: 858, Visits: 2,318
Gail,

wouldn't the Database level Audit be enough, as this seems to handle events for Select, Insert, Update, and Delete Actions? Or would the overhead be significant?


_________________________________________________________________________
SSC Guide to Posting and Best Practices
Post #1423635
Posted Monday, February 25, 2013 8:36 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 3:00 PM
Points: 11,948, Visits: 10,981
GilaMonster (2/25/2013)
Sean Lange (2/25/2013)
That only shows index usage. If your queries are not sargable or you have a heap your results may not be exactly what you are looking for.


A scan is a use of an index, and the index usage DMV does include heaps and clusters. SELECT * from HeapTable will put an entry in that DMV.


I didn't realize that heaps would end up in there. Thanks for the correction Gail.


_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Post #1423637
Posted Monday, February 25, 2013 8:41 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 1:58 PM
Points: 41,513, Visits: 34,428
Jason-299789 (2/25/2013)
wouldn't the Database level Audit be enough, as this seems to handle events for Select, Insert, Update, and Delete Actions?


That should work too, might have to aggregate, I don't know offhand how the audit shows results.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1423642
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse