External Performance   «Prev  Next»
Lesson 6File striping across disks
Objective Stripe a data file.

OS File Stripping Methods

In Oracle, data files contain a single tablespace that may contain one or more objects. Depending upon how the DBA configured the database, a single Oracle data file may have extremely high I/O, and moving the data file from one disk to another will only move the hot spot around. In these cases, we need to spread the hot data file across numerous physical disks by data striping. To do this, you segregate an individual table or index into a separate tablespace.

What are the different OS File Stripping Methods in Oracle

In Oracle, the operating system (OS) file striping methods are used to distribute data across multiple disk drives to improve performance and reliability. The following are the different OS file stripping methods in Oracle:
  1. Operating System-level Striping (RAID-0): The data is divided into chunks and each chunk is stored on a separate disk drive.
  2. Operating System-level Mirroring (RAID-1): The data is mirrored across multiple disk drives, providing data redundancy in case of disk failures.
  3. Operating System-level Striping with Parity (RAID-5): The data is striped across multiple disk drives, with parity information used to reconstruct the data in case of disk failures.
  4. Operating System-level Striping with Dual Parity (RAID-6): The data is striped across multiple disk drives, with dual parity information used to reconstruct the data in case of two disk failures.

It is important to note that the OS file stripping methods must be used in conjunction with database-level technologies such as datafiles, tablespaces, and redo logs to provide a complete data protection and performance optimization strategy.

Stripe data across several disks

This is how you would stripe a large customer table across several disks.
  1. Create the tablespace to consist of multiple files, each on a separate disk.

Stripe Layout
Stripe Layout

Create tablespace new_cust_tablespace
datafile ‘u01/oradata/cust1.dbf’ size 100M,

datafile ‘u01/oradata/cust2.dbf’ size 100M,

datafile ‘u01/oradata/cust3.dbf’ size 100M;

  1. Now that the tablespace exists, copy the table into the new tablespace, using the MINEXTENTS parameter to place a separate table extent into each physical data file.

Stripe 2
Stripe 2

Create table new_customer
Select * from customer
Storage ( INITIAL 100m NEXT 100m miNEXTents 3 );

Now the customer table is spread evenly across three disks, with one extent on each disk. After running CTAS to copy the table, you must drop the indexes from the old table and re-create them on the new table.
The next lesson is about OS methods for striping data files.

File Striping across Disks - Exercise

Before you go on, click the Exercise link below to practice data striping on your own.
File Striping across Disks - Exercise