Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Oracle logical management mode

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Logical space management:

Manage tablespaces locally:

(default) the database uses bitmap blocks in the tablespace itself to manage extents.

Therefore, the local management space needs to reserve part of the table space for bitmap blocks to record the use of area space.

In a tablespace, the database can use automatic segment space management (ASSM) or manual segment space management (MSSM) to manage segments.

The locally managed tablespace maintains a bitmap in the data file header to track the free and used space in the data file body. Each bit corresponds to a set of blocks. When space is allocated or freed, the Oracle database changes the bitmap value to reflect the new state of the block.

Local management tablespace advantages:

1. Avoid using data dictionaries to manage the extension.

two。 Automatically track adjacent free space

3.

Dictionary management tablespaces use data dictionaries to manage their extensions.

Whenever an extent is allocated or freed, the Oracle database updates the table in the data dictionary.

For example, when a table needs an extension, the database queries the data dictionary table and searches for free extents. If the database finds space, modify a data dictionary table and insert a row. In this way, the database manages space by modifying and moving data.

Segment space management:

Segment space management is data inherited from the tablespace that contains the segment.

In a locally managed tablespace, the database can manage segments automatically or manually.

For example, segments in users tablespaces are managed automatically, while segments in tools tablespaces are managed manually.

Use only PCTFREE to control space allocation, which specifies the percentage of space reserved for future updates in the block to prevent row migration.

Multiple transactions can search multiple independent lists of free blocks, thereby reducing contention and waiting.

Manual segment management space (MSSM):

The old MSSM method uses a linked list called a free list to manage the free space in a segment.

For a database object with free space, there is a free list that tracks blocks below the high water mark HWM. When the block is used, the database places the block into the free list or removes the block from the free list as needed.

In addition to the fact that PCTFREE,MSSM uses PCTUSED to set the percentage of free space that must exist in the currently used block, when the percentage of used space in the block is less than this percentage, the block is identified as valid and placed in the free list. Only valid blocks are allowed to insert data. After ORACLE9I, the default is automatic management, and ASSM discards the pctused attribute.

Description: if you insert a row into a table. The database checks the table's free list to find the first available block.

If the row cannot fit into the block and the space used in the block is greater than or equal to pctused, the database removes the table from the free list and searches for another block. If you delete a row from a block, the database checks to see if the used space in the block is now less than pctused. If so, the database places the block at the beginning of the free list.

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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report