As you can see, the interaction between Oracle data blocks and the database engine is fairly complex.
We have covered some very important information in this module
relating to Oracle data blocks and their effects on database performance.
Now that you have completed this module, you should be able to:
- Determine appropriate data block size
- Describe the functions of the segment header parameters
- Set PCTUSED and PCTFREE parameters for optimal performance
- Size table and index extents
- Monitor and detect poorly performing indexes
Here are terms from this module that may be new to you:
- data block header
- high water mark
Now that we know how to manage data blocks for optimal database performance, let's move on to look at tuning with Oracle data structures.
The DB_BLOCK_SIZE initialization parameter specifies the standard block size for the database.
This block size is used for the SYSTEM tablespace and by default in other tablespaces. Oracle Database can support up to four additional nonstandard block sizes.
DB_BLOCK_SIZE Initialization Parameter
The most commonly used block size should be picked as the standard block size.
In many cases, this is the only block size that you need to specify. Typically, DB_BLOCK_SIZE is set to either 4K or 8K.
If you do not set a value for this parameter, the default data block size is operating system specific, which is generally adequate.
You cannot change the block size after database creation except by re-creating the database. If the database block size is different from the operating system block size, ensure that the database block size is a multiple of the operating system block size. For example, if your operating system block size is 2K (2048 bytes), the following setting for the DB_BLOCK_SIZE initialization parameter is valid:
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.
Nonstandard Block Sizes
Tablespaces of nonstandard block sizes can be created using the CREATE TABLESPACE statement and specifying the BLOCKSIZE clause. These nonstandard
block sizes can have any of the following power-of-two values: 2K, 4K, 8K, 16K or 32K.
Platform-specific restrictions regarding the maximum block size apply, so some of these sizes may not be allowed on some platforms.