Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
suvbin
Creator III
Creator III

Usage of batch apply mode and transaction apply mode

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.

 

Labels (3)
10 Replies
Michael_Litz
Support
Support

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

suvbin
Creator III
Creator III
Author

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. 

Michael_Litz
Support
Support

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

SushilKumar
Support
Support

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

MoeE
Partner - Specialist
Partner - Specialist

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

 

john_wang
Support
Support

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.

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!
MoeE
Partner - Specialist
Partner - Specialist

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 

Heinvandenheuvel
Specialist III
Specialist III

PSA - @MoeE 's replies to this older thread have their own topic in:

https://community.qlik.com/t5/Qlik-Replicate/Does-Change-Processing-Mode-have-an-effect-on-how-chang...

 

>> 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