HiveBrain v1.2.0
Get Started
← Back to all entries
snippetMinor

How to track how many times the data is read?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
thetrackhowreadmanytimesdata

Problem

I want to track how many times records are read in a specific table.

Let's say that we have this table

ID      Name
1       Cat
2       Dog
3       Fish


I want to know how many times the record "Cat" has been read and how many times the record "Dog" has been read and so on.

What is the best way to achive this goal?

Solution

There is no way in SQL Server 2008 (at least one that I'm aware of) to know as much details as you want - to see how many times every single record has been read.

I can hardly see it as necessary, as long as every time a query goes to full table scan, than each table record will be read, even though it was not actually needed by a user, but only by a poorly written query.

PS: maybe I misunderstood your question, so, in this case, I'd go sit in a corner :-).

Context

StackExchange Database Administrators Q#4503, answer score: 2

Revisions (0)

No revisions yet.