When you define key constraints or indexes in target tables, you slow the loading of data to those tables. To improve performance, drop indexes and key constraints before you run the session. You can rebuild those indexes and key constraints after the session completes.
If you decide to drop and rebuild indexes and key constraints on a regular basis, you can use the following methods to perform these operations each time you run the session:
Use pre-load and post-load stored procedures.
Use pre-session and post-session SQL commands.
To optimize performance, use constraint-based loading only if necessary.