Confusion over Keep Cache
I have some confusion about Keep Pool in Buffer Cache.
1. What is the reasoning for placing a table in the KEEP buffer pool because if it is frequently accessed, it will be around when needed (ie if it is constantly being accessed it will not age out) .
2. Would the table be still in the Default Pool if the Keep Pool is not sized and the command is being issued alter TABLE SCOTT.EMP storage (buffer_pool keep) ?
3. If the database is restarted will the table be wiped out of the Keep Pool and again be pinned to the Keep Pool ?
1. Exactly, but keep keeps it there for sure
3. It's common to use an after startup trigger to pin objects in the keep pool
If you are on 11g and want even faster access, and the table isn't too big, consider using the result cache.
The KEEP pool is just a buffer cache as DEFAULT and RECYCLE are.
If you do not size KEEP pool to hold all the data you want to keep in there blocks will age out the same way they do when in the DEFAULT or RECYCLE pools - Only difference is, competition for KEEP buffer cache datablocks is restricted to the objects you assign to it.
Hope this clarifies.
Pablo (Paul) Berzukov
Author of Understanding Database Administration
available at amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
Thanks everyone for your helpful answers.
I did one test. Initially DB_KEEP_CACHE_SIZE was set as 0. I placed a table into the cache and when I checked the cache size it was 16M and the table was not into Default Cache.
Click Here to Expand Forum to Full Width