Saturday, July 31, 2010

Partitioning in Oracle

Partitioning enables tables and indexes or index-organized tables to be subdivided into smaller manageable pieces and these each small piece is called a partition. From an Application Development perspective, there is no difference between a partitioned and a non-partitioned table. The application need not be modified to access a partitioned table if that application was initially written on a non partitioned tables.

Oracle introduced partitioning like Range Partitioning, Hash Partitioning, Composite Partitioning, List Partitioning,etc. Each method of partitioning has its own advantages and disadvantages and the decision which one to use will depend on the data and type of application. Also one can MODIFY, RENAME, MOVE, ADD, DROP, TRUNCATE, SPLIT partitions.

Advantages of using Partition’s in Table

1. Smaller and more manageable pieces of data (Partitions)
2. Reduced recovery time
3. Failure impact is less
4. Import / Export can be done at the Partition Level.
5. Faster access of data
6. Partitions work independent of the other partitions.
7. Very easy to use

What is SQL*Loader and why it is used for?

SQL*Loader is a bulk loader utility used for moving data from external files into the Oracle database. Its syntax is similar to that of the DB2 Load utility, but comes with more options. SQL*Loader supports various load formats, selective loading, and multi-table loads.

One can load data into an Oracle database by using the sqlldr utility. Invoke the utility without arguments to get a list of available parameters.