Sql-server – Are Clustered Index Usage Stats skewed since they are referenced in Non-Clustered Keys

dmvindexsql server

When using tools like SP_BlitzIndex and looking at usage stats for indexes. Would clustered index usage be skewed in any way since they are secret keys in all non-clustered indexes and would be read more often than not?

Trying to determine if a table has the correct clustered index, it's read usage is high but looking at how data is being accessed, I don't see a lot of direct joins utilizing the clustered index column that would lead me to believe the usage numbers.

Best Answer

The user_lookups column of sys.dm_db_index_usage_stats is a count of clustered index key lookups (a.k.a. bookmark lookups). This indicates a data row retrieved via a non-clustered index using the clustered index key row locator. The separate user_seeks and user_scans columns for a clustered index count the number of times the CI was used directly.

These columns allow you to determine how the clustered index is being used in query plans.