Skip to Main Content
  • Questions
  • Relationship Between shared pool and sub pool

Breadcrumb

Question and Answer

Tom Kyte

Thanks for the question.

Asked: January 06, 2011 - 11:45 pm UTC

Last updated: January 07, 2011 - 1:22 pm UTC

Version: 10.2.0.1

Viewed 1000+ times

You Asked

respect, tom
I know sub pools in shared pool
I know that Sub pools will has maximum 7, too
Each sub pool has independent freelist, LRU, Shared pool latch etc…

1. If at hard parsing, specific sub pool has shared pool latch for free space allocation
What criteria choose specific sub pool of many sub pools(if exist 7)?
Random?
thanks

and Tom said...

We hash the identifier to determine what sub pool to allocate memory from.

It is very similar to the way we manage database blocks - there are many list of blocks (we call a list a "cache buffer chain"). Each list is protected by a latch (a lock, a serialization device). When we look for a block in the cache - we take the DBA (data block address - file.block) and hash it into a number between 1 and the number of lists (cache buffer chain lists) and we know to latch that list and look there.

We do the same thing in the shared pool - if you are looking for object "X", we hash "X" into a number 1..number of sub pools and that is where it would be.

Is this answer out of date? If it is, please let us know via a Comment