When inserting a new data row or updating a data row requires more space (for example, if the last field of a row is null (trailingnull), it must be updated to a non-null value now ),
When inserting a new data row or updating a data row requires more space (for example, if the last field of a row is null (trailing null), update it to a non-null value ),
Data Block overview
Oracle manages the storage space in the database data file. The unit is data block ). A data block is the smallest (logical) data unit in a database. The minimum physical storage unit of all data at the operating system level is byte ). Each operating system has a parameter called block size. Each time Oracle acquires data, it always accesses the entire data block (Oracle), instead of accessing data according to the capacity of the operating system block.
The standard data block capacity in the database is specified by the initialization parameter DB_BLOCK_SIZE. In addition, you can specify five non-standard data block capacities (nonstandard block size ). The block capacity should be set to an integer multiple of the block capacity of the operating system (also smaller than the maximum limit of the block capacity) to reduce unnecessary I/O operations. Oracle data blocks are the minimum storage units that Oracle can use and allocate.
See also:
Oracle documents for specific operating systems contain more information about data block size.
Multiple Block Sizes)
2.2.1 data block structure
In Oracle, whether the data block stores a table, index, or cluster data, its internal structure is similar. -2 describes the structure of the data block.
-2 data block structure
This figure shows the components of a data block, including the common and variable header, table directory ), row directory, free space, and row data ). The following sections describe the components. The two arrows in the figure indicate that the capacity of the available space area in a data block is variable.
2.2.1.1 data block header (including standard content and variable content)
The data block header contains the summary information of the data block, such as the block address and the segment to which the data block belongs (for example, table or index ).
2.2.1.2 table directory
If a data table stores data rows in this data block, the data table information is recorded in the table directory area of the data block.
2.2.1.3 row directory
This area contains the information of the data rows stored in the data block (the address of each row segment (row piece) in the row data area ). [A data block may save a complete data row or only a part of the data row. Therefore, we use row piece]
When the row directory space of a data block is used, the row directory space will not be recycled even if the row is deleted. For example, when a data block that once contains 50 records is cleared, its header (header) Row directory still occupies 100 bytes of space. The row directory space will be reused only when new data is inserted into the data block.
2.2.1.4 management overhead
Data block header, table directory, and row directory are collectively referred to as overhead ). Some overhead capacity is fixed, while some overhead total capacity is variable. The average capacity of fixed and variable management overhead in data blocks is between 84 and 107 bytes (bytes.
2.2.1.5 rows of data
The row data area of a data block contains the actual data of a table or index. A Data row can span multiple data blocks. This shows "Row Chaining" and "Row Migrating)