Data Block也称为page, 它是Oracle IO的最小单位,不同于OS的block,它是逻辑存储结构,由多个OS block组成,查看OS block大小:$ getconf PAGESIZE
At the physical level, database data is stored in disk files made up of operating system blocks.
An operating system block is the minimum unit of data that the operating system can read or write. In contrast, an Oracle block is a logical storage structure whose size and structure are not known to the operating system.
Data block called an Oracle block or page. A data block is the minimum unit of database I/O.
The following figure shows that operating system blocks may differ in size from data blocks.
Description of "Figure 12-6 Data Blocks and Operating System Blocks"
The logical separation of data blocks from operating system blocks has the following implications:
Applications do not need to determine the physical addresses of data on disk.
Database data can be striped or mirrored on multiple physical disks.
DB_BLOCK_SIZE想更改只能重建数据库
The DB_BLOCK_SIZE initialization parameter sets the data block size for a database when it is created. The database block size cannot be changed except by re-creating the database.
如果建库时没指定一般会设置为4KB或8KB,取决于操作系统
If DB_BLOCK_SIZE is not set, then the default data block size is operating system-specific. The standard data block size for a database is 4 KB or 8 KB. If the size differs for data blocks and operating system blocks, then the data block size must be a multiple of the operating system block size.
You can create individual tablespaces whose block size differs from the DB_BLOCK_SIZE setting.
A nonstandard block size can be useful when moving a transportable tablespace to a different platform.
Every data block has a format or internal structure that enables the database to track the data and free space in the block.
This format is similar whether the data block contains table, index, or table cluster data.
The following figure shows the format of an uncompressed data block.
Description of "Figure 12-7 Data Block Format"
Oracle Database uses the block overhead to manage the block itself. The block overhead is not available to store user data. Some parts of the block overhead are fixed in size, but the total size is variable. On average, the block overhead totals 84 to 107 bytes.
As shown in "Data Block Format", the block overhead includes the following parts:
- Block header
用于存储disk address, segment type, transaction entry
This part contains general information about the block, including disk address and segment type. For blocks that are transaction-managed, the block header contains active and historical transaction information.
关于interested transaction list(ITL):
每当事务要更新数据块里的数据时,必须先得到一