top of page

Table Used most in SQL Server

SELECT TOP (5) b.name AS TableName,

a.database_id,

a.singleton_lookup_count,

a.range_scan_count

FROM sys.dm_db_index_operational_stats(DB_ID(), NULL, NULL, NULL) AS a

INNER JOIN sys.objects b on a.object_id = b.object_id

WHERE b.type <> 'S'

AND

(a.singleton_lookup_count > 0 OR a.range_scan_count > 0)

ORDER BY a.singleton_lookup_count DESC

GO

13 views0 comments

Recent Posts

See All

Σχόλια


bottom of page