In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
There is a SEQ value in the head of the undo segment. When the rollback segment is used from zone A to zone B, the corresponding SEQ value will be increased by 1. For example, if the SEQ value of zone An is 6, the SEQ value of the undo segment will become 7 when it is used in zone B.
But the undo space is recycled, and when the transaction in the undo segment is committed, the corresponding block can be overwritten. As follows:
When Zone 3 is fully used, oracle will re-use Zone 1 and increase its SEQ value to 7, and so on. After the new Zone 1 is used up, Zone 2 will also be covered, and the SEQ value will be changed to 8.
But the undo space is recycled, and when the transaction in the undo segment is committed, the corresponding block can be overwritten. As follows:
When Zone 3 is fully used, oracle will re-use Zone 1 and increase its SEQ value to 7, and so on. After the new Zone 1 is used up, Zone 2 will also be covered, and the SEQ value will be changed to 8.
The principle of undo block overwriting is that the undo block to be overwritten must be smaller than the previous SEQ value. If the figure is as follows
There has always been a transaction in Zone 2 that has not been released, and when the undo is reused to Zone 1 again, the value of Zone 1 changes to 10. At this time, because the transaction in area 2 has not been released, oracle cannot overwrite area 2, nor can it skip area 2 to reuse the undo block in area 3. At this time, oracle will conduct an extend, and a new undo area will be added between area 1 and area 2, which we call the new area 2. Then oracle will overwrite in the new area 2, and after the new area 2 coverage is completed, if the transaction has not been committed in the old area 2, oracle will apply for extend again until the transaction is committed. This will cause the undo segment to consume a lot of space in a short period of time. As follows:
If the area 2 is at the beginning of the undo segment, this will result in most of the space in the undo segment not being reused, so oracle adds a steal mechanism.
First of all, it is determined that the basic unit of the undo theft mechanism is the district. For example, the above situation occurs:
Original area 2: that is, area 3 has been occupied by transactions in part of the block, so that it can not be overwritten. Then oracle's undo theft mechanism will work, other undo segments will steal area 4, this undo section will leave three areas, and then extend will be carried out after the new area 2.
However, if the transaction in area 3 is not committed, the oracle will remain extend, resulting in the area before area 3 can not be reused, the undo segment has been increasing, and the undo space may not be expanded. So transactions, big or small, should be committed as soon as possible.
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.