Optimizing Replicat Performance
If the batch operation is not significant, you can think of optimizing the performance of the replicat process.If you are replicating to an Oracle Database, you can use Integrated Replicat which gives an easy-to-configure and optimized parallel data apply. You can also use Oracle GoldenGate BATCHSQL command to optimized the batch processing in Oracle GoldenGate replicat. Please refer to Using BATCHSQL for the details.
Dual Apply
For batch operations including millions or billions of transactions, you then need to avoid the replication. Let's look an example scenario where Oracle GoldenGate is used to replicating an eCommerce transaction database to a data warehouse database for real-time analytics. During the holiday season, mass updates are needed for promotions such as updating to sale prices or enabling promotions options. These update can quickly hit millions of records (Some operations can hit billions of records.) in a single operation. Because Oracle GoldenGate only captures individual operations from the redo logs and replicates one operation time, Oracle GoldenGate replication thus shows significant lag time.
For these type of scenarios, the recommendation is to suspend the replication process, perform the bath operation on the source/target directly and then resume the replication. This approach is also referred to as "Dual Apply." which involves the following steps: [1]
- Create a database user on the source to perform the batch operation.
- Exclude the user from the Oracle GoldenGate
- Create a table which you will use to insert a record to trigger the event in Oracle GoldenGate replication to stop the replicat.
- Configure the replicat to stop if an "start of the batch operation" event is received
Please refer to support note Oracle GoldenGate Best Practices: Dual Apply for GoldenGate (Doc ID 1451675.1) for the configuration details.
- Oracle GoldenGate Best Practices: Dual Apply for GoldenGate (Doc ID 1451675.1)