|
Optimize the Massive DELETE Operation in Oracle, Part 1Average Rating: 3.6/5 | Rate this item | 29 users have rated this item.
|
Optimize the Massive DELETE Operation in Oracle, Part 1 (cont'd) |
|
Performing Massive DELETEs as Bulk INSERT
The following steps implement the technique of implementing DELETEs as direct-path INSERTs:
- Create a table (TestData_X) with the identical structure as the TestData table in the previous section but with no primary key, alternate key(s), or foreign key(s) constraints (NOLOGGING option).
- Insert data that you need to be keep into the newly created table using direct-path INSERT.
- Create indexes on the new table with NOLOGGING PARALLEL options.
- Create constraints on the new table. Use the ENABLE NOVALIDATE option for referential integrity and check constraints.
- Swap the TestData and TestData_X tables: rename TestData to TestData_T, rename TestData_X to TestData.
- Restore the original logging settings.
- Verify the results and drop the TestData_T table.
 |
|
|
Optimize the Massive DELETE Operation in Oracle, Part 2 will present the SwapOps package, which contains all of the APIs necessary to implement the above steps. It also will present performance tests for DELETEs and direct-load INSERT, and compare the two.
|
|
|
|
|
|
|
|