<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Latency in target apply in Qlik Replicate</title>
    <link>https://community.qlik.com/t5/Qlik-Replicate/Latency-in-target-apply/m-p/2142015#M8264</link>
    <description>&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;nbsp;&lt;EM&gt;We are encountering latency issues with Snowflake as our target.&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;And it is confirmed to be target latency in UI or in log with PERFORMANCE DEBUG?&lt;/P&gt;
&lt;P&gt;To understand this in general you should set LOG level for TARGET APPLY to DEBUG and see which queries takes long. You can and should correlate this with SQL activity for the Attunity User on target. The Snowflake UI makes this relatively easy: how many queries - how long.&lt;/P&gt;
&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;nbsp;&lt;SPAN&gt;, I noticed the "attrep exception error." I need to understand the cause of this latency&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Well, that make this issue easy to understand i guess... . Replicate will normally (Snowflake always) apply changes in batches which could be just a few rows, or thousand, or a hundred thousand. Snowflake will gladly swallow those batches in a few seconds. However, when an error occurs and the task has requested exception logging then Replicate goes out on a mission to find which row(s) caused the error. To do so it issues a singleton change request for each row in the batch. Now while Snowflake is super fast in handling thousands or millions of changes in seconds, it is very slow for a singleton request. I rarely see a single update take less than a second and 2 seconds is 'normal'. Compare that to SQLserver or Oracle which answer in milliseconds - thousand times faster.&lt;/P&gt;
&lt;P&gt;So if 1 row fails in a 5000 row batch, Replicate may take 5000 or even 10000 second to figure out which one, one at a tine. That's and hour or two. There is your latency!&lt;/P&gt;
&lt;P&gt;Hein.&lt;/P&gt;</description>
    <pubDate>Tue, 28 Nov 2023 14:48:15 GMT</pubDate>
    <dc:creator>Heinvandenheuvel</dc:creator>
    <dc:date>2023-11-28T14:48:15Z</dc:date>
    <item>
      <title>Latency in target apply</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Latency-in-target-apply/m-p/2141780#M8242</link>
      <description>&lt;P&gt;&lt;SPAN&gt;We are encountering latency issues with Snowflake as our target. I'm unsure why this is happening, as all transactions seem to be committing to disk. There are almost 60,000 transactions on disk. Upon reviewing the logs, I noticed the "attrep exception error." I need to understand the cause of this latency and how to address it.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;00009656: 2023-11-27T21:38:38 [TARGET_APPLY&amp;nbsp;&amp;nbsp;&amp;nbsp; ]W:&amp;nbsp; Source changes that would have had no impact were not applied to the target database. Refer to the 'attrep_apply_exceptions' table for details&amp;nbsp; (endpointshell.c:7174&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2023 23:02:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Latency-in-target-apply/m-p/2141780#M8242</guid>
      <dc:creator>Titus</dc:creator>
      <dc:date>2023-11-27T23:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: Latency in target apply</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Latency-in-target-apply/m-p/2141782#M8243</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/255986"&gt;@Titus&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Generally that warning message can be ignored as it means that nothing would have changed if the transaction was applied to the target, something like a delete on a row that is already gone on the target, that type of thing - but it depends upon what you find when you query the attrep_apply_exceptions table on the target.&lt;/P&gt;
&lt;P&gt;Target latency generally points to an issue sending data to the target. Root cause can include issues on the network or the target itself, those items should be explored.&lt;/P&gt;
&lt;P&gt;Are you seeing the latency during the full load phase of the task or change processing?&lt;/P&gt;
&lt;P&gt;Has this task worked well previously (meaning it is not a brand new task)?&lt;/P&gt;
&lt;P&gt;I can also share with you "best practice" task settings when using Snowflake target, these may also help:&lt;/P&gt;
&lt;P&gt;Set the Max file size on the advanced tab of the target endpoint to 2000 MB&lt;BR /&gt;To increase the size of the batches sent to Snowflake, please edit the settings in Task Settings \ Change Processing \ Change Process Tuning:&lt;/P&gt;
&lt;P&gt;Longer than (seconds) to 299&lt;BR /&gt;But less than (seconds) to 300&lt;BR /&gt;Force apply a batch when memory exceeds to 2000&lt;BR /&gt;Transaction offload tuning:&lt;BR /&gt;Total transactions memory size exceeds (MB) to 5000&lt;BR /&gt;Transactions duration exceeds (seconds) to 86400&lt;/P&gt;
&lt;P&gt;If this information does not help, please open a support case and provide a diagnostics package for the task that includes logging elevated for Performance to trace for 10-15 minutes. If there is an error condition or evidence of a software defect, Support can help. If not, we can involve our Professional Services team.&lt;/P&gt;
&lt;P&gt;You might also find this knowledge article helpful:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Official-Support-Articles/Latency-Performance-Troubleshooting-and-Tuning-for-Replicate/ta-p/1734097" target="_blank"&gt;Latency / Performance Troubleshooting and Tuning f... - Qlik Community - 1734097&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Dana&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2023 23:15:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Latency-in-target-apply/m-p/2141782#M8243</guid>
      <dc:creator>Dana_Baldwin</dc:creator>
      <dc:date>2023-11-27T23:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: Latency in target apply</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Latency-in-target-apply/m-p/2142015#M8264</link>
      <description>&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;nbsp;&lt;EM&gt;We are encountering latency issues with Snowflake as our target.&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;And it is confirmed to be target latency in UI or in log with PERFORMANCE DEBUG?&lt;/P&gt;
&lt;P&gt;To understand this in general you should set LOG level for TARGET APPLY to DEBUG and see which queries takes long. You can and should correlate this with SQL activity for the Attunity User on target. The Snowflake UI makes this relatively easy: how many queries - how long.&lt;/P&gt;
&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;nbsp;&lt;SPAN&gt;, I noticed the "attrep exception error." I need to understand the cause of this latency&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Well, that make this issue easy to understand i guess... . Replicate will normally (Snowflake always) apply changes in batches which could be just a few rows, or thousand, or a hundred thousand. Snowflake will gladly swallow those batches in a few seconds. However, when an error occurs and the task has requested exception logging then Replicate goes out on a mission to find which row(s) caused the error. To do so it issues a singleton change request for each row in the batch. Now while Snowflake is super fast in handling thousands or millions of changes in seconds, it is very slow for a singleton request. I rarely see a single update take less than a second and 2 seconds is 'normal'. Compare that to SQLserver or Oracle which answer in milliseconds - thousand times faster.&lt;/P&gt;
&lt;P&gt;So if 1 row fails in a 5000 row batch, Replicate may take 5000 or even 10000 second to figure out which one, one at a tine. That's and hour or two. There is your latency!&lt;/P&gt;
&lt;P&gt;Hein.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 14:48:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Latency-in-target-apply/m-p/2142015#M8264</guid>
      <dc:creator>Heinvandenheuvel</dc:creator>
      <dc:date>2023-11-28T14:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: Latency in target apply</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Latency-in-target-apply/m-p/2142984#M8305</link>
      <description>&lt;P&gt;Update please?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the issue is still there and not understood can you attach a relevant chunk of the reptask.log (as .txt?!) With TARGET _APPLY logging set to Trace/Debug please.&lt;/P&gt;
&lt;P&gt;Hein.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2023 16:37:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Latency-in-target-apply/m-p/2142984#M8305</guid>
      <dc:creator>Heinvandenheuvel</dc:creator>
      <dc:date>2023-11-30T16:37:51Z</dc:date>
    </item>
  </channel>
</rss>

