????4.???????????
????SELECT M.type??
????SUM(M.virtual_memory_reserved_kb) AS VirtualMemoryReservedKB??
????SUM(M.virtual_memory_committed_kb) AS VirtualMemortCommitedKB??
????SUM(M.shared_memory_committed_kb) AS SharedMemroyCommittedKB??
????SUM(M.shared_memory_reserved_kb) AS SharedMemroyReservedKB??
????SUM(M.multi_pages_kb) AS MultiPagesKB??
????SUM(M.single_pages_kb) AS SinglePagesKB??
????SUM(M.multi_pages_kb)+SUM(M.single_pages_kb) AS TotalPagesKB
????FROM sys.dm_os_memory_clerks M
????GROUP BY M.type
????ORDER BY TotalPagesKB DESC
??????????????????????????????????????????????????????

????????
???????????????????????????????????????????飬???????????????? MEMORYCLERK_SQLOPTIMIZER????????????
???????
sp_configure N'show advanced options'??1
GO
reconfigure
GO
sp_configure N'optimize for ad hoc workloads'??1
GO
sp_configure N'show advanced options'??1
GO
reconfigure
GO
?????????????????????????????????????SQL SERVER ??????????????????檔