Friday, October 17, 2008

Table Partitioning in Oracle

Partitioning is a divide and conquers strategy in which you decompose very large tables and indices into more manageable chunks.Each chunk are called a partition.
Learn by Questions:
1] Do I need to modify my SELECT query after partitioning my table?
The SELECT query need not be modified to access the data in the table.In fact no DML [Insert, Update, Delete] logic/queries need to be modified in your application.Partitioning is purely a database concept and it is transparent to the applications.
2] What are the advantages of Partitioning?
a. Data Management operations like index creation and rebuilding, Data loading, Back/Recovery etc can be carried at partition level rather than at table level.So the times of these operations can be significantly reduced.
b. Partitions/subset of partitions can be accessed concurrently to get the query results.
c. As the Table, Index partitioning decreases the data management time, the availability of critical databases can be increased.
3] Can I partition any table?
Of course you can partition any table.But it is of no use in partitioning all the tables.Large tables, frequently used tables are the potential candidates eligible partitioning.For example in EnterpriseOne F0911 is eligible for partitioning.

4] Query level inf0
a. Information about the partitions on a table,say F0911
Select * from dba_tab_partitions where table_name='F0911'
b. Select * from testdta.F0911 Where ...
This query will always holds good, whether the table is partitioned or not.So the applications logic need not be modified to speak to a partitioned table.
c. Select * from testdta.F0911 partition()
Select count(*) from testdta.F0911 partition
()
This is to query a particular partition

5] JD Edwards Enterprise and partitioning
The first point to be keep in mind is Table/Index partitioning is a database concept and applications[without any modification] will work with partitioned tables.
But any DDL operations carried from the application will not preserve the partitioned structure at database level.So enough care has to be taken while generating the tables/indices via the OMW tool.

6] How to partition table?
Better refer this links to manage the partitions on a table
a. Table and index partitioning
b.Managing Partitioned Tables and Indexes

No comments: