Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Large Object in buffer cache


Large Object in buffer cache

Author
Message
PearlJammer1
PearlJammer1
Old Hand
Old Hand (322 reputation)Old Hand (322 reputation)Old Hand (322 reputation)Old Hand (322 reputation)Old Hand (322 reputation)Old Hand (322 reputation)Old Hand (322 reputation)Old Hand (322 reputation)

Group: General Forum Members
Points: 322 Visits: 1427
Hello
We are using Redgates SQL Monitor tool and I am getting 'Large object in buffer cache' alert message - I have read that I need to find out what the object is and that this object may be suitable for compression or a schema revision (data type changes or sparse columns).
I have ran the following query:

USE [tempdb]
GO
SELECT COUNT(*) AS cached_pages_count ,
( COUNT(*) * 8.0) / 1024 AS MB ,
CASE database_id
WHEN 32767 THEN 'ResourceDb'
ELSE DB_NAME(database_id)
END AS Database_name
FROM sys.dm_os_buffer_descriptors
GROUP BY DB_NAME(database_id) ,
database_id
ORDER BY cached_pages_count DESC;

and the results are thus :

Cached_pages_count MB DataBase_Name
344695 2692.929687 a
336681 2630.320312 b
320527 2504.117187 c
154540 1207.343750 d

Can anybody advise on how i deal with the alert
chris.kelly5
chris.kelly5
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 62
I would suggest that you modify the t-sql that you are using for the metric to resemble this. It should include the object name.

WITH CTE_1
AS (SELECT DB_NAME() AS dbName,
obj.name AS objectname,
ind.name AS indexname,
COUNT(*) AS cached_pages_count
FROM 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_id
LEFT OUTER JOIN sys.indexes ind
ON
obj.objectid = ind.object_id
AND obj.index_id = ind.index_id
WHERE bd.database_id = DB_ID()
AND bd.page_type IN ('data_page', 'index_page')
GROUP BY obj.name,
ind.name,
obj.index_id
)
SELECT TOP 1 *,
ObjPercent = CONVERT(NUMERIC(18, 2),
(CONVERT(NUMERIC(18, 2), cached_pages_count)
/ SUM(cached_pages_count) OVER ()) * 100)
FROM CTE_1
ORDER BY cached_pages_count DESC;
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search