oracle11g - Oracle 11g 数据库管理

标签 oracle11g

为什么 Oracle 数据库 block 和操作系统 block 的大小不同?我搜索了Oracle网站,但没有找到满意的答案。

最佳答案

数据库 block 是逻辑存储单元,操作系统 block 是物理存储单元。它们的大小不必不同,但只要逻辑 block 大小等于或大于物理 block 大小,并且是物理 block 大小的倍数,它们就可以不同。这使得 Oracle 能够检索最佳数量的数据,而不管底层硬件如何,因此可以提高效率并减少开销。

来自database concepts guide :

Data Blocks and Operating System Blocks

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.

...

The database requests data in multiples of data blocks, not operating system blocks.

When the database requests a data block, the operating system translates this operation into a requests for data in permanent storage. 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.

administration guide还说:

If the database block size is different from the operating system block size, then ensure that the database block size is a multiple of the operating system block size.

...

A larger data block size provides greater efficiency in disk and memory I/O (access and storage of data). Therefore, consider specifying a block size larger than your operating system block size if the following conditions exist:

  • Oracle Database is on a large computer system with a large amount of memory and fast disk drives. For example, databases controlled by mainframe computers with vast hardware resources typically use a data block size of 4K or greater.

  • The operating system that runs Oracle Database uses a small operating system block size. For example, if the operating system block size is 1K and the default data block size matches this, the database may be performing an excessive amount of disk I/O during normal operation. For best performance in this case, a database block should consist of multiple operating system blocks.

关于oracle11g - Oracle 11g 数据库管理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19182866/

相关文章:

database - 如何从 Oracle 中的缓存中删除表?

plsql - 一个批量收集操作循环中的两个(或更多)DML

sql - 使用 Oracle Insert Into...Values 插入多个值

plsql - Oracle 11g PL/SQL PACKAGE 中 CONTANT 变量的位置

windows - 环境变量 'ORACLE_UNQNAME' 的 Oracle 问题

oracle - PL SQL 中多个参数的逗号分隔查询

sql - 如何覆盖 ORDER 方法 PL/SQL?

Oracle 共享内存领域不存在

sql - 将每月的第一天和最后一天放入变量中 - Oracle

sql - 为什么=运算符除了值1之外不能与ROWNUM一起使用?