Tuesday, November 15, 2011

Script to Parallelizing Table Creation in Oracle


While creating a table AS SELECT and populating it with data, it can be executed in parallel. This way both the CREATE part( DDL) and SELECT part (query) will be parallelized as shown below

SQL > CREATE TABLE table_name PARALLEL COMPRESS AS SELECT * FROM source_table


The above statement will parallelize the table creation and will store the result in compressed format

The PARALLEL clause tells the database to select an optimum number of parallel execution servers when creating the table.

No comments:

Post a Comment