Oracle Data Blocks

Oracle 数据块,也称为Page,是数据库I/O的最小单位,不同于操作系统块,它具有逻辑存储结构。DB_BLOCK_SIZE参数确定其大小,创建后无法更改。数据块包含块头、感兴趣事务列表(ITL)、表目录、行目录等,用于跟踪数据和空闲空间。块头存储磁盘地址和段类型,ITL记录事务信息。Oracle通过空间管理优化性能,避免碎片,包括PCTFREE和PCTUSED参数。此外,索引块有根块、分支块和叶块,用于高效检索键值。
摘要由CSDN通过智能技术生成

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.

Data Block Format

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"

  1. Data Block Overhead

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:

  1. 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):

每当事务要更新数据块里的数据时,必须先得到一

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值