Tag:Usage status

  • SQL statement query SQL server memory usage


    Select type, – type of clerk sum(virtual_ memory_ reserved_ kb)as vm_ Reserved_ KB, – reserved memory sum(virtual_ memory_ committed_ kb)as vm_ Committed_ KB, – committed memory sum(awe_ allocated_ kb)as awe_ Allocated_ KB, – memory used after awe is turned on sum(shared_ memory_ reserved_ kb)as sm_ Reserved_ KB, – shared reserved memory sum(shared_ memory_ committed_ kb)as […]

  • SQL statement to query index usage


    SELECT sch.name + ‘.’ + t.name AS [Table Name], i.name AS[Index Name], i.type_desc, ISNULL(user_updates,0) AS [Total Writes], ISNULL(user_seeks +user_scans + user_lookups,0) AS [Total Reads], s.last_user_seek, s.last_user_scan , s.last_user_lookup, ISNULL(user_updates,0) – ISNULL((user_seeks+ user_scans +user_lookups),0)AS [Difference], p.reserved_page_count * 8.0 / 1024 as SpaceInMB FROM sys.indexes AS i WITH (NOLOCK) LEFT OUTERJOIN sys.dm_db_index_usage_statsAS s WITH (NOLOCK) ON s.object_id […]