Applying Similar SQL Statements in Arrays
Use the BATCHSQL
parameter to increase the performance of Replicat. BATCHSQL
causes Replicat to organize similar SQL statements into arrays and apply them at an accelerated rate. In its normal mode, Replicat applies one SQL statement at a time.
When Replicat is in BATCHSQL
mode, smaller row changes will show a higher gain in performance than larger row changes. At 100 bytes of data per row change, BATCHSQL
has been known to improve the performance of Replicat by up to 300 percent, but actual performance benefits will vary, depending on the mix of operations. At around 5,000 bytes of data per row change, the benefits of using BATCHSQL
diminish.
The gathering of SQL statements into batches improves efficiency but also consumes memory. To maintain optimum performance, use the following BATCHSQL
options:
BATCHESPERQUEUE BYTESPERQUEUE OPSPERBATCH OPSPERQUEUE
As a benchmark for setting values, assume that a batch of 1,000 SQL statements at 500 bytes each would require less than 10 megabytes of memory.
You can use BATCHSQL
with the BATCHTRANSOPS
option to tune array sizing. BATCHTRANSOPS
controls the maximum number of batch operations that can be grouped into a transaction before requiring a commit. The default for non-integrated Replicat is 1000. The default for integrated Replicat is 50. If there are many wait dependencies when using integrated Replicat, try reducing the value of BATCHTRANSOPS
. To determine the number of wait dependencies, view the TOTAL_WAIT_DEPS
column of the V$GG_APPLY_COORDINATOR
database view in the Oracle database.
See Reference for Oracle GoldenGate for additional usage considerations and syntax.