-- Memory

-- Getting a sense for a DMV
select 	distinct type 
from 	sys.dm_os_memory_clerks
order by type

-- Memory Breakdown for Top Components
select top 10
		type, sum (single_pages_kb + multi_pages_kb + virtual_memory_committed_kb + awe_allocated_kb + shared_memory_committed_kb) KB
	from 
		sys.dm_os_memory_clerks 
	group by 
		type
	order by
		KB desc


-- Memory Consumption by Extended Stored Procedres
select 
		type,
		sum (single_pages_kb + multi_pages_kb + virtual_memory_committed_kb + awe_allocated_kb + shared_memory_committed_kb) KB
	from 
		sys.dm_os_memory_clerks 
	where 
		[type] like '%SQLXP%'
	group by
		[type]

select * from sys.dm_os_memory_objects

dbcc memorystatus with no_infomsgs
