You can define this in one extract group or multiple extract groups.
For replicat, the following is an example with the RANGE function. Without the coordinated replication, the definition will be in multiplier replicat groups and is shown as follows:
RANGE function can be used in Oracle GoldenGate extract, pump and replicat . It’s primarily used for performance tuning purposes. You can divide data into multiple extract/replicat groups for parallel processing. RANGE function preserves data integrity by guaranteeing that the same row will always be processed by the same process group.
For extract (faster than using in the replicat) , an example setup is as follows:
RMTTRAIL ./dirdat/aa
table src.customer, filter (@range(1,4,CUSTOMER_ID));
RMTTRAIL ./dirdat/bb
table src.customer, filter (@range(2,4,CUSTOMER_ID));
RMTTRAIL ./dirdat/cc
table src.customer, filter (@range(3,4,CUSTOMER_ID));
RMTTRAIL ./dirdat/dd
table src.customer, filter (@range(4,4,CUSTOMER_ID));
map src.customer, target trg.customer, filter (@range(1,4,CUSTOMER_ID));
map src.customer, target trg.customer, filter (@range(2,4,CUSTOMER_ID));
map src.customer, target trg.customer, filter (@range(3,4,CUSTOMER_ID));
map src.customer, target trg.customer, filter (@range(4,4,CUSTOMER_ID));
For coordinated replicat (12.1.2.1+) , you can define this as follows:
MAP src.customer, target trg.customer, THREADRANGE(1-4, CUSTOMER_ID));
Note that if lag occurs, then the data processing order might be different from the source and may causes a primary key, unique key, or foreign key constraint violation. If data processing order is important to be preserved, consider use the integrated or coordinated replicat which are available in Oracle GoldenGate 12.1.2.+ versions.
Example:
A table with 500 columns and the replication has significant lag time (more than 30 hours). To reduce the lag time, RANG function is used at the extract to split the load into multiple extracts, then multiple pumps and replicats to reduce the lag.
Q&A:
- Why I get the “OGG-01298 Column function diagnostic message: could not find column range.” error?
Answer: Make sure you include @ with the RANGE, otherwise, you will get this error. -
How does extract process related to each other when using the RANGE function?
Details: There are 3 extracts defined with range.
Answer:
– If unable to start 1 extract due to typo, will it prevent other 2 from starting? Answer: No.
– If one of the Extract abends during running, will the other two stay running? Answer: Yes
– If it does stay running will it pickup the work that would have been done by the abend Extract? Answer: No
– Customer is running 11.2. Any change to feature in 12.1? Answer: No, there is no change in 12.1 for this on the extract side. But on the replicat side, use the coordinated replicat after 12.1.