In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to understand buffer cache in Oracle". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let Xiaobian take you to learn "how to understand buffer cache in Oracle"!
1. Buffer cache
Database buffers are part of Oracle's memory structure, SGA.
2. Buffer cache significance
(1) Cache dbf files.
Buffer exists in memory, dbf exists on disk. When reading data from disk, dbf data will first be sent to buffer cache to achieve the role of cache.
(2) Structural cr block
In a session, users delete a piece of data but do not commit it. The data before the change is placed in the undo segment. When another session reads the data of the same block and finds that the data in the block has been deleted, a new block will be generated in the buffer cache. This new block is generated by the old block, and the deleted data will be supplemented by undo. This new block is called cr block.
So when one session deletes a piece of data without committing it, the other session sees the data before it was deleted.
3. Database Write Process (DBWn)
When a block in the buffer cache is modified, the modified block is called a dirty block. DBWn is responsible for writing dirty blocks from buffer cache to dbf files.
DBWn is not triggered every time a data block is changed. Even when triggered, not all blocks are written into dbf files, but some infrequently used blocks are written in. It has certain trigger conditions.
(1) Triggers every 3 seconds
(2) When the data is to be written into the buffer cache, it is found that there is not enough space.
(3) When performing checkpoint processes
4. Important parameters configuration of Buffer cache
(1) Query the size of each component of sga
SQL> select component,current_size/1024/1024 current_M,min_size/1024/1024 min_M from v$sga_dynamic_components;
(3) Modify buffer cache size
SQL> alter system set db_cache_size=20M scope=both;
In general, for DB_CACHE_SIZE settings, the recommended configuration is:
1/2~2/3 of SGA_MAX_SIZE
At this point, I believe that everyone has a deeper understanding of "how to understand buffer cache in Oracle," so let's actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.