question

Alessandro avatar image
Alessandro asked

Is plan cache included in Buffer Pool?

Hello community, I’m facing with a question that drives me crazy: I try to figure out if plan cache (like other memory areas) are included in buffer pool. I consider the output of **sys.dm_os_memory_clerks**, where MEMORYCLERK_SQLBUFFERPOOL, MEMORYCLERK_SQLCONNECTIONPOOL, CACHESTORE_SQLCP seem to be distinct memory areas. From that I understand that plan cache (CACHESTORE_SQLCP + CACHESTORE_OBJCP + CACHESTORE_PHDR + CACHESTORE_XPROC) is not included in MEMORYCLERK_SQLBUFFERPOOL because they are different clerk types. Moreover, I run DBCC FREEPROCCACHE, and I noticed that MEMORYCLERK_SQLBUFFERPOOL clerk memory is not changed at all, while the above mentioned CACHESTORE_SQLCP,CACHESTORE_OBJCP,CACHESTORE_PHDR, CACHESTORE_XPROC become ZERO. So, I suppose that plan cache is not include, but I read that some authors say the opposite. Which is the correct answer? Thanks a lot Ale
memory
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ThomasRushton avatar image ThomasRushton ♦♦ commented ·
0 Likes 0 ·
Alessandro avatar image Alessandro commented ·
I am talking about SQL 2012, but it not important. It seems that plan cache is included in Buffer Pool, but Why there is a specific clerk named MEMORYCLERK_SQLBUFFERPOOL that suggests that every other clerk is NOT buffer pool? The root cause of this doubt is such clerk, that is related only to a part of the memory
0 Likes 0 ·

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.