Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Administration - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 6525

cached_pages_count is Higher for index in MS sql server

$
0
0
select count(*)as cached_pages_count, obj.name as objectname, ind.name as indexname, obj.index_id as indexidfrom sys.dm_os_buffer_descriptors as bd inner join ( select object_id as objectid, object_name(object_id) as name, index_id,allocation_unit_id from sys.allocation_units as au inner join sys.partitions as p on au.container_id = p.hobt_id and (au.type = 1 or au.type = 3) union all select object_id as objectid, object_name(object_id) as name, index_id,allocation_unit_id from sys.allocation_units as au inner join sys.partitions as p on au.container_id = p.partition_id and au.type = 2 ) as obj on bd.allocation_unit_id = obj.allocation_unit_idleft outer join sys.indexes ind on obj.objectid = ind.object_id and obj.index_id = ind.index_idwhere bd.database_id = db_id() and bd.page_type in ('data_page', 'index_page')group by obj.name, ind.name, obj.index_idorder by cached_pages_count descAbove query is returning very high values in cached_pages_count as below. Could you please explain the reason for value cached_pages_count is very high and is it risky. if it is risky, could you please share a solution for it.cached_pages_count objectname indexname indexid1511157 audit_activity PK__audit_ac__321418600268428D 11467836 tran_master tran_mst_pk 1457599 agent_settlement agent_settlement_pk 1There many indexes which has cached_pages_count is higher.

Viewing all articles
Browse latest Browse all 6525

Trending Articles