Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
Can you please let me know the Usage of batch apply mode and transaction apply mode. When to go for batch apply and when to go for transaction apply.
Thanks.
Hi @suvbin
Batch Apply is the default setting because it is much faster than Transactional Apply.
Transactional Apply mode is generally slower than Batch apply mode because the task will replay the source TLog transactions exactly as they are ordered in the source TLog. Each update to a record will be applied to the target one statement at a time.
Batch Apply mode will do many optimizations to the transactions that it reads from the source Tlog. A couple of examples would be the combining of several statements on one table into a single statement. Like the Insert followed by a couple of update statements would be combined into a single Insert Statement, or several Update statements that would be combined. The most import thing that batch will do is apply all the records in the bac=tch as a single command to the target instead of hundreds, if not thousands of individual statements.
In general batch apply should be used since it is faster.
In some task environments like a Bi Directional task pair it is required to use transactional mode.
Le me know if this helps out and or please accept this as a solution
Thanks,
Michael Litz
Here are two good links that discuss this:
changing batch apply mode to transaction apply mode and vice versa will get rid of current attrep_change table.? If so why to to like this.
Hi @suvbin ,
You typically would set the task to use either or.
I have not seen a use case where the task was switched from one to the other.
Thanks,
Michael Litz
Hello Team,
In addition to the previous comments .In general batch apply should be used since it is faster.
In some task environments like a Bi Directional task pair it is required to use transactional mode or where customer want data in the way it was applied on the Source database.
Where the Changes are very less. in Such case Qlik replicate may wait to create a batch to apply onto target endpoint.
hope its helps.
Regards,
Sushil Kumar
HI Michael,
You mentioned "Transactional Apply mode is generally slower than Batch apply mode because the task will replay the source TLog transactions exactly as they are ordered in the source TLog. Each update to a record will be applied to the target one statement at a time."
I have a question about transactional apply mode. So basically, if I ran one update statement on the source, for example, update all records where height > 100cm, which resulted in 10 records being updated on the source. Does this mean that on the target, there will be 10 update statements, rather than one.
Thank you.
Mohammed
Hello Mohammed, @MoeE
Yes, you’re right — in this mode, all the changed rows are applied to the target table one by one, in order, rather than as a single DML operation. This is because, in the transaction log, the 10 UPDATEs are recorded as 10 individual DML operations, even though they were triggered by a single SQL statement.
Hope this helps.
John.
Hi John,
Thanks so much for the quick confirmation! I have another question. Does the change processing mode also affect how changes are applied to the change tables? e.g. if i have transactional apply and change tables enabled, will the records be inserted into the change table one by one as well?
Regards,
Mohammed
PSA - @MoeE 's replies to this older thread have their own topic in:
>> Does the change processing mode also affect how changes are applied to the change tables?
Probably, even though there is no strict need. But why don't you simply try some and see what happens on the target?
You have been working with this stuff long enough to answer these questions yourself i should think!
And once you confirmed the workings, kindly report back here and we can mark it was 'solution'.
Cheers,
Hein