Alternative Approaches For Partitioning Existing Tables

Arup Nanda has written an article for dbazine.com on the various methods for implementing partitioning for existing Oracle tables. Arup goes through a number of different options, including

  • Creating the partitioned table from scratch, using CREATE TABLE ... AS SELECT to select from the original table
  • Creating the table, then populating it from the original table using INSERT /*+ APPEND */
  • Using EXPORT to extract data from the table, dropping and recreating it partitioned and then IMPORTing back in to it
  • export the table's data to a flat file, drop and recreate it with partitions, then use SQL*Loader direct path

and a new method proposed by the author that takes a slightly different approach

  • Creating and populating smaller tables that correspond to the partitions that are going to be created, creating the new table with all the candidate partitions but with no data in, then using the  EXCHANGE PARTITION feature to swap these small tables with the partitions in our new table.

It's a good article that gives an excellent overview to the partitioned table creation process and Arup's proposal certainly sounds interesting. Take a look for more details including examples of syntax, and the pros and cons of each approach.