Re: in sql server is it possible to get the amount of memory used by a stored procedure? e.g. memory usage statistics per stored procedure?
- From: "Uri Dimant" <urid@xxxxxxxxxxx>
- Date: Tue, 28 Aug 2007 08:27:06 +0300
Daniel
See if this helps you
SELECT TOP 25
obj.[name],
i.[name],
i.[type_desc],
count(*)AS Buffered_Page_Count ,
count(*) * 8192 / (1024 * 1024) as Buffer_MB
-- ,obj.name ,obj.index_id, i.[name]
FROM sys.dm_os_buffer_descriptors AS bd
INNER JOIN
(
SELECT object_name(object_id) AS name
,index_id ,allocation_unit_id, object_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_name(object_id) AS name
,index_id, allocation_unit_id, object_id
FROM sys.allocation_units AS au
INNER JOIN sys.partitions AS p
ON au.container_id = p.hobt_id
AND au.type = 2
) AS obj
ON bd.allocation_unit_id = obj.allocation_unit_id
LEFT JOIN sys.indexes i on i.object_id = obj.object_id AND i.index_id =
obj.index_id
WHERE database_id = db_id()
GROUP BY obj.name, obj.index_id , i.[name],i.[type_desc]
ORDER BY Buffered_Page_Count DESC
"Daniel" <softwareengineer98037@xxxxxxxxx> wrote in message
news:%23ituyGQ6HHA.5844@xxxxxxxxxxxxxxxxxxxxxxx
in sql server is it possible to get the amount of memory used by a stored
procedure? e.g. memory usage statistics per stored procedure?
.
- References:
- Prev by Date: Re: About logins and roles
- Next by Date: Re: About logins and roles
- Previous by thread: in sql server is it possible to get the amount of memory used by a stored procedure? e.g. memory usage statistics per stored procedure?
- Next by thread: Re: About logins and roles
- Index(es):
Relevant Pages
|
|