Oracle High Performance Tuning for 9i and 10g

 < Day Day Up > 


In general larger block sizes are appropriate to read-only data warehouse-type databases. Smaller block sizes are appropriate to highly concurrent, highly active OLTP databases with small transactions. Block size can be 2K, 4K, 8K, 16K, and 32K. An OLTP database could have serious problems reading a few bytes of data from 32K blocks. A data warehouse would suffer immense performance problems reading huge volumes of data from block size of 2K because of the huge number of blocks it would have to read.

Tip 

Available block sizes and DB_nK_CACHE_SIZE parameters may vary for different operating systems. A 32K block size is not available for Win2K SP3 running Oracle9i Release 2 (9.2).

A block size of 8K is the Oracle Database default. I have never seen an OLTP Oracle database with a block size of less than 8K other than older versions of Oracle Database. Definitely beware of an OLTP Oracle database with 16K or 32K block size.

One other important factor is the DB_FILE_MULTIBLOCK_ READ_COUNT parameter.

Tip 

The SORT_MULTIBLOCK_READ_COUNT has been deprecated from Oracle9i Database.

The DB_FILE_MULTIBLOCK_READ_COUNT parameter allows the reading of multiple blocks at once. The default value for Oracle9i Database is 8 for OLTP databases. I generally set this value to 8 but it can be set to 4 or even 2 for OLTP databases depending on reporting and the nastiness of application SQL code. Any reporting or poorly written SQL code tends to warrant a higher setting for the DB_FILE_MULTIBLOCK_READ_COUNT parameter. Bad SQL code tends to execute more full scanning anyway. Setting the DB_FILE_MULTIBLOCK_READ_COUNT parameter higher will encourage more full physical scanning.

So beware of OLTP databases with block size larger than 8K and a high DB_FILE_MULTIBLOCK_READ_COUNT. Large blocks and large block read counts do not fit well with small transactions and high DML activity. The result could be wasted I/O and probably extensive locking and latch wait problems. Do not set high values for anything to do with block size for OLTP databases. Do the opposite for data warehouse databases. Let's look further at different types of databases briefly:


 < Day Day Up > 

Категории