<?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: Slow SQL Server updates in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314753#M85492</link>
    <description>&lt;P&gt;Your Jira looks fine.&lt;/P&gt; 
&lt;P&gt;If you find anything further that is relevant, feel free to add it in comments.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;By the way, have you taken part in the survey (advertised in the right side bar at the top on all posts)? I'd value your input. It only takes a few minutes (less than 5)&lt;/P&gt;</description>
    <pubDate>Fri, 06 Sep 2019 17:40:30 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-09-06T17:40:30Z</dc:date>
    <item>
      <title>Slow SQL Server updates</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314713#M85452</link>
      <description>&lt;P&gt;Is Talend making any effort to improve Talend performance with MS SQL Server?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Having searched this community and old talendforge forums entries, it appears there are performance issues with Talend using SQL Server.&amp;nbsp; I found this article (&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCnkACAS" target="_self"&gt;Data loading from MS SQL Server DB to other MS SQL Server DB is very low compared to SSIS&lt;/A&gt;) which confirms my own experience in comparing Talend to Datastage (2005 Server Edition -- an old, no longer supported version).&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I built a Talend job to mirror what the old Datastage job is doing -- syncing content between two tables:&amp;nbsp; a source table on one SQL Server and a target table on another SQL Server.&amp;nbsp; The data is about 220k rows.&amp;nbsp; The Datastage jobs does this (with MSOLEDB stage) in &amp;lt; 2 minutes with 2238 rows/sec.&amp;nbsp; Talend is poking along (with tMSSqlOutput component) and barely able to make less than 30 rows/sec!&amp;nbsp; Really??&amp;nbsp; Almost 100x slower?&amp;nbsp; What the heck is it doing?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I tried changing the batch size, changing to use a component connection and changing the Commit Every setting; tried using select top to limit rows (just to see the impact).&amp;nbsp; None of these made significant differences in performance.&amp;nbsp; Still achieves &amp;lt; 30 rows/sec.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 19:03:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314713#M85452</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-21T19:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: Slow SQL Server updates</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314714#M85453</link>
      <description>All I can say is that your job or database are poorly configured if those numbers are true. I'm currently working with Ms SQL Server and am able to get around 2500 rows per second without even looking into optimisation of my job.</description>
      <pubDate>Wed, 21 Mar 2018 19:29:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314714#M85453</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-21T19:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: Slow SQL Server updates</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314715#M85454</link>
      <description>&lt;P&gt;I appreciate you confirming you are able to see decent results.&amp;nbsp; That gives me hope that it is something misconfigured in the job.&amp;nbsp; It is clearly not the database as Datastage can achieve respectable rates similar to what you stated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The input side of the job all performs very well.&amp;nbsp; The job uses tMSSQLInput to select&amp;nbsp;all rows in the source table, another tMSSQLInput to select all rows from the target table into a tHashOutput, and then compares the two streams in a tMap, sending the output to either an insert path or an update path depending upon whether the record exists in the target with the same CRC (calculated in a tAddCRCRow to evaluate changes to the columns).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I&amp;nbsp;direct the insert and update paths to simple delimited files, the output is also performant reaching 51k rows/sec.&amp;nbsp; (Of course, I realize a flat file is going to be extremely faster than a DB update.&amp;nbsp; Just using it to isolate where the issue lies.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I enable the&amp;nbsp;tMSSqlOutput components on the insert and update paths, the performance drops to &amp;lt; 30 rows/sec.&amp;nbsp; Thus, the reason I've been playing around with the various settings for that component.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 19:42:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314715#M85454</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-21T19:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: Slow SQL Server updates</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314716#M85455</link>
      <description>&lt;P&gt;I built a new job that does nothing but select rows from one table and insert them into a new table in the same DB on the same server.&amp;nbsp; I see the same results with this new, simpler job even though it is on a different DB and different server than the previous job was running against.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Based upon the displayed statistics, it cranks along fine at about 1k-2k rows/sec until it hits 10k rows and then just apparently hangs.&amp;nbsp; If I wait, it will eventually finish and I'll then see the 30 rows/sec rate.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Given the 10k limit, I tried changing the "Batch Size" and "Commit Every" values (which appear to be the same as the "Array Size" and "Transaction Size" in Datastage) to other than 10k.&amp;nbsp; As expected when I do this, it then hangs at whatever the larger of those two values are.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2018-03-21 at 1.34.54 PM.png" style="width: 560px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lsnt.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/143222i75A20229B9283C2D/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lsnt.png" alt="0683p000009Lsnt.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 20:33:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314716#M85455</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-21T20:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: Slow SQL Server updates</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314717#M85456</link>
      <description>&lt;P&gt;Right, I have just set up a job based on a table I have with 37668 rows. First, I essentially used Talend to read everything into a tHash component and write it to a new version of the table (but with no indexes or primary key). I used Talend to "create table if does not exist" and it built the table and loaded all 37668 rows in 1.74 seconds. This was with standard "out of the palette' settings.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2018-03-21 at 20.07.14.png" style="width: 836px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LswX.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/143481iA3E63CDE658A9FB3/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LswX.png" alt="0683p000009LswX.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;However, inserting into an empty table and updating are two different beasts, so I then changed the job to update every single one of the 37668 rows. The only change I made was to the "Action on data" option and I set the update key using the Advanced settings' "Use field options". I then ran the job again....and I managed to get 47.66 rows per second....&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2018-03-21 at 20.50.47.png" style="width: 744px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lsy1.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/149677i26B8538156266338/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lsy1.png" alt="0683p000009Lsy1.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Pretty terrible, but I barely changed anything and the database table has no keys or indexes.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I next played around with the "Use batch size" and "Commit every" settings and got marginal gains, but nothing substantial.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Now remember I said I have no keys or indexes on the table. Well I decided to add a clustered index on the update key field. This is an entirely reasonable thing to do, in fact it could be argued that you should index your tables appropriately to how they are used. If you update by a combination of columns as a composite key, you should create an index based on that combination of columns. Anyway, I added the index and ran exactly the same bog standard update with default settings (other than the "field options" settings). This was the result....&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2018-03-21 at 21.05.07.png" style="width: 762px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lt9S.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/127775iEE9345A66A8028A6/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lt9S.png" alt="0683p000009Lt9S.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;19598.34 rows per second from 47.66 just by adding an index on the update key.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Now I understand you may not be able to add any new indexes on your table, but I assume you have some already. Are you able to set the field options of the db component to match any existing indexes? Can you rebuild the index before you run? Essentially you have to performance tune the Talend job like you would performance tune a SQL query (going back to ETL with just database links &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; ).&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 21:08:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314717#M85456</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-21T21:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: Slow SQL Server updates</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314718#M85457</link>
      <description>&lt;P&gt;UPDATE: I just realized that this simple job is doing a straight insert so the update key won't have any affect. DOH!&amp;nbsp; I built the same simple job in Datastage for comparison and will do further testing.&amp;nbsp; I'll try the update key in the job doing the updates and see if that is an improvement.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Well, that is interesting.&amp;nbsp; (Note that this simple job is just doing an insert, not update.)&amp;nbsp; Refer to images, below:&lt;/P&gt; 
&lt;UL&gt; 
 &lt;LI&gt;The key in my target table is already a primary clustered key.&lt;/LI&gt; 
 &lt;LI&gt;I have that column marked as the key in my Talend schemas.&lt;/LI&gt; 
 &lt;LI&gt;I enabled "Field Options" and checked the box under "Update Key" beside that column.&lt;/LI&gt; 
 &lt;LI&gt;I set "Commit Every" and "Batch Size" back to the default 10k.&lt;/LI&gt; 
 &lt;LI&gt;Performance hasn't changed.&amp;nbsp; It reaches 10k fine, and then hangs.&lt;/LI&gt; 
&lt;/UL&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2018-03-21 at 2.22.10 PM.png" style="width: 561px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lt5H.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/147108i4FA06BD276710B68/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lt5H.png" alt="0683p000009Lt5H.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2018-03-21 at 2.23.20 PM.png" style="width: 796px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LspB.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/147768i7D1019972C4F1139/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LspB.png" alt="0683p000009LspB.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2018-03-21 at 2.26.22 PM.png" style="width: 440px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LsxP.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/149678i5A5121FC4D932D58/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LsxP.png" alt="0683p000009LsxP.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2018-03-21 at 2.21.16 PM.png" style="width: 472px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lt9m.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/147471i41E9E287349A990A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lt9m.png" alt="0683p000009Lt9m.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2018-03-21 at 2.20.31 PM.png" style="width: 297px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LsZd.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/151262i581394CF8A413DED/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LsZd.png" alt="0683p000009LsZd.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 21:49:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314718#M85457</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-21T21:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: Slow SQL Server updates</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314719#M85458</link>
      <description>&lt;P&gt;Figured out one thing:&amp;nbsp; I had been using the Microsoft provided JDBC provider.&amp;nbsp; Apparently, that was a bad idea.&amp;nbsp; In the simple insert job, I switched to the Open Source JTDS provider and it now is providing very respectable numbers.&amp;nbsp; However, making that switch in my other job (the one doing the update) has not had that same affect.&amp;nbsp; The performance drops dramatically once it hits the first commit/batch limit.&amp;nbsp; Dang...&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 22:39:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314719#M85458</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-21T22:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: Slow SQL Server updates</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314720#M85459</link>
      <description>&lt;P&gt;One more thing to check (I do this automatically and forgot to mention), did you untick the "updatable" field for the update key column in the field options? This can make a big difference since updating a key field (even with the same value) will incur an update performance hit since the index is technically having to be recalculated. Since it is a key value, it won't change....so you may as well untick the updatable field.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;If that doesn't make a difference then I can only assume there is something funky going on with&amp;nbsp;your database config. My database is not on the same machine as my Studio. In fact, it is in a different country. My Studio machine is a virtual machine with 8GB RAM (not ideal). However I am processing more data in a fraction of the time with what appear to be the same (or very similar) Talend settings.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;BR /&gt;In your last post you say "Note that this simple job is just doing an insert, not update" and show the status of the job hung. But you also show the field options with an update key specified. You only want to use the update key option if you are updating....not that it will make much of difference in an insert.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;By the way, I don't believe your job is hanging at 10000 records. That is just a user interface "feature" it is displaying the results pre-emptively according to the "Batch Size" settings. Switch that off and you will see the result increment in smaller more frequent increments. Alternatively if you left your job running it would eventually get through the data (probably in a similar sort of time to if you left the job running with the "Batch Size" swicthed off).&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Another slight difference between yours and mine is that you are using a primary key. When inserting a value into a primary key field the database essentially has to ensure that the value being inserted is unique, otherwise the constraint is broken. This will cause a little latency when inserting a large amount of data with existing PK data. Having said that, it shouldn't cause the issues you are seeing.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I really do not believe that Talend is doing anything weird here. Firstly because I have never seen any issues on countless customer sites. Secondly because Talend are simply using third party Jars to provide the database functionality. These are the same Jars used by many other Java applications with database interactions. All Talend does is prepare insert/update/select statements which are sent to the DB using these Jars. Even if the statements were inefficient, most RDBMS' ultimately rewrite the statements internally to make them more efficient. Any latency caused by Talend is more likely to be caused by complex in-memory transformations reuquiring a lot of memory. This is the main cause of any perfomance tuning I need to carry out, no matter what database I am using.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 22:40:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314720#M85459</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-21T22:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: Slow SQL Server updates</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314721#M85460</link>
      <description>&lt;P&gt;NOTE: I added the topic&amp;nbsp;&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCs3zCAC#M238" target="_self"&gt;Performance impact of tMSSqlOutput Commit Every and Batch Size&lt;/A&gt;&amp;nbsp;which shows the performance of inserts and how Commit and Batch affect the outcome.&amp;nbsp; I did this testing with regard to the experience I was describing in this thread.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;First, thank you very much for all the info you have shared and provided.&amp;nbsp; It is really appreciated.&amp;nbsp; I've got years of Datastage experience and now we're moving to Talend.&amp;nbsp; Much of what I know still applies but the details are often different.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;HR /&gt; 
 &lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;wrote: 
 &lt;BR /&gt; 
 &lt;P&gt;One more thing to check (I do this automatically and forgot to mention), did you untick the "updatable" field for the update key column in the field options?&lt;/P&gt; 
 &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
 &lt;HR /&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;P&gt;&lt;SPAN&gt;Yes, saw that list and made that same change at the time.&amp;nbsp; I unchecked&amp;nbsp;everything except the primary key in the&amp;nbsp; "Update key" column and checked everything except the primary key in the&amp;nbsp;"Updatable" column.&amp;nbsp; I even unchecked everything in the "Insertable" column, just in case.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;HR /&gt; 
 &lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;wrote: 
 &lt;P&gt;If that doesn't make a difference then I can only assume there is something funky going on with&amp;nbsp;your database config. My database is not on the same machine as my Studio. In fact, it is in a different country. My Studio machine is a virtual machine with 8GB RAM (not ideal). However I am processing more data in a fraction of the time with what appear to be the same (or very similar) Talend settings.&lt;/P&gt; 
 &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
 &lt;HR /&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;P&gt;For this "update" job, the source and target databases are remote from me, both in Chicago.&amp;nbsp; My Studio machine is a Macbook Pro 16G Ram, 2.8 GHz i7.&amp;nbsp; As noted in the article from the link at top, my inserts appear to be performing fine.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;HR /&gt; 
 &lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;wrote: 
 &lt;P&gt;In your last post you say "Note that this simple job is just doing an insert, not update" and show the status of the job hung. But you also show the field options with an update key specified. You only want to use the update key option if you are updating....not that it will make much of difference in an insert.&lt;/P&gt; 
 &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
 &lt;HR /&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;P&gt;Yeah, I caught that just after I posted and then made an update to that post.&amp;nbsp; Oversight on my part, getting confused between the two jobs.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;HR /&gt; 
 &lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;wrote: 
 &lt;P&gt;By the way, I don't believe your job is hanging at 10000 records. That is just a user interface "feature" it is displaying the results pre-emptively according to the "Batch Size" settings. Switch that off and you will see the result increment in smaller more frequent increments. Alternatively if you left your job running it would eventually get through the data (probably in a similar sort of time to if you left the job running with the "Batch Size" swicthed off).&amp;nbsp;&lt;/P&gt; 
 &lt;HR /&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;P&gt;I only meant "hanging" in the sense of the visual behavior I saw.&amp;nbsp; Of course, it is that the first "Batch" rows get processed very quickly (so the count goes quickly to that number), and then it hangs as it waits for that batch to be committed.&amp;nbsp; &amp;nbsp;As noted in the other article, "Batch" clearly has an impact on performance.&amp;nbsp; Disabling it&amp;nbsp;resulted in&amp;nbsp;a huge drop in performance for the inserts.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;HR /&gt; 
 &lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;wrote:&amp;nbsp; 
 &lt;P&gt;Another slight difference between yours and mine is that you are using a primary key. When inserting a value into a primary key field the database essentially has to ensure that the value being inserted is unique, otherwise the constraint is broken. This will cause a little latency when inserting a large amount of data with existing PK data. Having said that, it shouldn't cause the issues you are seeing.&lt;/P&gt; 
 &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
 &lt;HR /&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;P&gt;I think you are referring to the fact that one of the columns in the stream has the "Key" checked?&amp;nbsp; Assuming I understand that correctly, I had wondered why setting that column as the key still required me to do something else to tell the update to use it.&amp;nbsp; Seems odd.&amp;nbsp; In DS, setting a column as the key automatically makes it use in the update statement.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;HR /&gt; 
 &lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;wrote: 
 &lt;P&gt;I really do not believe that Talend is doing anything weird here. Firstly because I have never seen any issues on countless customer sites. Secondly because Talend are simply using third party Jars to provide the database functionality. These are the same Jars used by many other Java applications with database interactions. All Talend does is prepare insert/update/select statements which are sent to the DB using these Jars. Even if the statements were inefficient, most RDBMS' ultimately rewrite the statements internally to make them more efficient. Any latency caused by Talend is more likely to be caused by complex in-memory transformations reuquiring a lot of memory. This is the main cause of any perfomance tuning I need to carry out, no matter what database I am using.&amp;nbsp;&lt;/P&gt; 
 &lt;HR /&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;P&gt;Your point about using 3rd party components is an important one and certainly validates the thought that Talend isn't really at fault here, wherever else the fault might lie.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I'm just still stumped though still investigating.&amp;nbsp; Doesn't make sense why this Talend job would perform so poorly compared to a Datastage job doing the same thing to the same tables in the same database.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I will report back when and if I find out anything conclusive on the update performance issue.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Again, thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2018 18:35:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314721#M85460</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-22T18:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: Slow SQL Server updates</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314722#M85461</link>
      <description>&lt;P&gt;I'm still seeing 31 rows/sec in Talend vs. 3898 rows/sec in Datastage -- over&amp;nbsp;131 minutes&amp;nbsp;vs. 1 minute.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;In Datastage, I can look at the actual statement the stage is going to use:&lt;/P&gt; 
&lt;PRE&gt;UPDATE customer SET customer_name=?,ship_address=?,ship_postalcode=?,ship_city=?,ship_county=?,ship_state=?,ship_country=?,mktsegcode=?,crc=? WHERE cmf=?;&lt;/PRE&gt; 
&lt;P&gt;I'd really like to see if the SQL&amp;nbsp;used by the Talend component actually includes the WHERE clause to employ the update key.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The docs indicate there is a global variable QUERY but I've not been able to successfully access.&amp;nbsp; Probably have a syntax issue...&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2018 21:26:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314722#M85461</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-22T21:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: Slow SQL Server updates</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314723#M85462</link>
      <description>&lt;P&gt;I can help you here. On your workspace you will see a a tab called "Code" in the bottom left corner. Click on that and you will see the code generated. It is a bit messy, but you can learn a lot from it. Now your update component will have a name something like ....&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;tMSSqlOutput_&lt;/PRE&gt; 
&lt;P&gt;...after the _ will be a number. You can see the name when you click on the component and then click on the component tab. Lets assume your component is numbered 1. What you want to search for when looking in the code tab is for a code like this....&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;String update_tMSSqlOutput_1 =&lt;/PRE&gt; 
&lt;P&gt;This will take you to where your update query is built as a String.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2018 21:59:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314723#M85462</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-22T21:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: Slow SQL Server updates</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314724#M85463</link>
      <description>&lt;P&gt;I selected the component and then went to the "Code Viewer" window.&amp;nbsp; I didn't see any way to search there so I selected all the content and pasted it into notepad++.&amp;nbsp; I see references for "whetherReject_tMSSqlOutput_2", "pstmt_tMSSqlOutput_2", "updatedCount_tMSSqlOutput_2", and several&amp;nbsp;others but no&amp;nbsp;"update_tMSSqlOutput_2".&amp;nbsp; So I checked my "insert" path (tMSSqlOutput_1) and had the same result -- lots of references but no "insert_tMSSqlOutput_1".&amp;nbsp; (Yes, I was searching case-insensitive.)&amp;nbsp; I am clearly missing something...&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I can see where it uses "pstmt_tMSSqlOutput_2" as an arg&amp;nbsp;of type&amp;nbsp;java.sql.PreparedStatement, and can see where it builds that variable, but it only shows the column&amp;nbsp;values being added -- I assume as parameters to the statement.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2018-03-22 at 3.11.29 PM.png" style="width: 397px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lt3k.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/153190iDDDABC1CC1A33EA3/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lt3k.png" alt="0683p000009Lt3k.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;	
	/**
	 * [tMSSqlOutput_2 main ] start
	 */

	

	
	
	currentComponent="tMSSqlOutput_2";

	
    			if(log.isTraceEnabled()){
    				log.trace("row17 - " + (row17==null? "": row17.toLogString()));
    			}
    		



        whetherReject_tMSSqlOutput_2 = false;
                    if(row17.customer_name == null) {
pstmt_tMSSqlOutput_2.setNull(1, java.sql.Types.VARCHAR);
} else {pstmt_tMSSqlOutput_2.setString(1, row17.customer_name);
}

                    if(row17.ship_address == null) {
pstmt_tMSSqlOutput_2.setNull(2, java.sql.Types.VARCHAR);
} else {pstmt_tMSSqlOutput_2.setString(2, row17.ship_address);
}

                    if(row17.ship_postalcode == null) {
pstmt_tMSSqlOutput_2.setNull(3, java.sql.Types.VARCHAR);
} else {pstmt_tMSSqlOutput_2.setString(3, row17.ship_postalcode);
}

                    if(row17.ship_city == null) {
pstmt_tMSSqlOutput_2.setNull(4, java.sql.Types.VARCHAR);
} else {pstmt_tMSSqlOutput_2.setString(4, row17.ship_city);
}

                    if(row17.ship_county == null) {
pstmt_tMSSqlOutput_2.setNull(5, java.sql.Types.VARCHAR);
} else {pstmt_tMSSqlOutput_2.setString(5, row17.ship_county);
}

                    if(row17.ship_state == null) {
pstmt_tMSSqlOutput_2.setNull(6, java.sql.Types.VARCHAR);
} else {pstmt_tMSSqlOutput_2.setString(6, row17.ship_state);
}

                    if(row17.ship_country == null) {
pstmt_tMSSqlOutput_2.setNull(7, java.sql.Types.VARCHAR);
} else {pstmt_tMSSqlOutput_2.setString(7, row17.ship_country);
}

                    if(row17.mktsegcode == null) {
pstmt_tMSSqlOutput_2.setNull(8, java.sql.Types.VARCHAR);
} else {pstmt_tMSSqlOutput_2.setString(8, row17.mktsegcode);
}

                    if(row17.crc == null) {
pstmt_tMSSqlOutput_2.setNull(9, java.sql.Types.INTEGER);
} else {pstmt_tMSSqlOutput_2.setLong(9, row17.crc);
}


                    if(row17.cmf == null) {
pstmt_tMSSqlOutput_2.setNull(10 + count_tMSSqlOutput_2, java.sql.Types.VARCHAR);
} else {pstmt_tMSSqlOutput_2.setString(10 + count_tMSSqlOutput_2, row17.cmf);
}


    		pstmt_tMSSqlOutput_2.addBatch();
    		nb_line_tMSSqlOutput_2++;
    		
                if(log.isDebugEnabled())
            log.debug("tMSSqlOutput_2 - "  + ("Adding the record ")  + (nb_line_tMSSqlOutput_2)  + (" to the ")  + ("UPDATE")  + (" batch.") );
    		batchSizeCounter_tMSSqlOutput_2++;
    		
            	//////////batch execute by batch size///////
            	class LimitBytesHelper_tMSSqlOutput_2{
            		public int limitBytePart1(int counter,java.sql.PreparedStatement pstmt_tMSSqlOutput_2) throws Exception {
                try {
						
                if(log.isDebugEnabled())
            log.debug("tMSSqlOutput_2 - "  + ("Executing the ")  + ("UPDATE")  + (" batch.") );
						for(int countEach_tMSSqlOutput_2: pstmt_tMSSqlOutput_2.executeBatch()) {
							if(countEach_tMSSqlOutput_2 == -2 || countEach_tMSSqlOutput_2 == -3) {
								break;
							}
							counter += countEach_tMSSqlOutput_2;
						}
						
                if(log.isDebugEnabled())
            log.debug("tMSSqlOutput_2 - "  + ("The ")  + ("UPDATE")  + (" batch execution has succeeded.") );
                }catch (java.sql.BatchUpdateException e){
                	
                	int countSum_tMSSqlOutput_2 = 0;
					for(int countEach_tMSSqlOutput_2: e.getUpdateCounts()) {
						counter += (countEach_tMSSqlOutput_2 &amp;lt; 0 ? 0 : countEach_tMSSqlOutput_2);
					}
				
            	    	
            log.error("tMSSqlOutput_2 - "  + (e.getMessage()) );
                		System.err.println(e.getMessage());
                	
               			 }
    				return counter;
            	}
            	
            	public int limitBytePart2(int counter,java.sql.PreparedStatement pstmt_tMSSqlOutput_2) throws Exception {
                try {
                		
                if(log.isDebugEnabled())
            log.debug("tMSSqlOutput_2 - "  + ("Executing the ")  + ("UPDATE")  + (" batch.") );
						for(int countEach_tMSSqlOutput_2: pstmt_tMSSqlOutput_2.executeBatch()) {
							if(countEach_tMSSqlOutput_2 == -2 || countEach_tMSSqlOutput_2 == -3) {
								break;
							}
							counter += countEach_tMSSqlOutput_2;
						}
						
                if(log.isDebugEnabled())
            log.debug("tMSSqlOutput_2 - "  + ("The ")  + ("UPDATE")  + (" batch execution has succeeded.") );
                }catch (java.sql.BatchUpdateException e){
                	
                	
					for(int countEach_tMSSqlOutput_2: e.getUpdateCounts()) {
						counter += (countEach_tMSSqlOutput_2 &amp;lt; 0 ? 0 : countEach_tMSSqlOutput_2);
					}
					
            	    	
            log.error("tMSSqlOutput_2 - "  + (e.getMessage()) );
                        System.err.println(e.getMessage());
                	
                		}	
                	return counter;	
            	}
            }
    		if ((batchSize_tMSSqlOutput_2 &amp;gt; 0) &amp;amp;&amp;amp; (batchSize_tMSSqlOutput_2 &amp;lt;= batchSizeCounter_tMSSqlOutput_2)) {
    		
    		            
            	    		updatedCount_tMSSqlOutput_2 = new LimitBytesHelper_tMSSqlOutput_2().limitBytePart1(updatedCount_tMSSqlOutput_2,pstmt_tMSSqlOutput_2);
            	    	
    			
			    batchSizeCounter_tMSSqlOutput_2 = 0;
			}
    		

    	////////////commit every////////////
    			
    		    commitCounter_tMSSqlOutput_2++;
                if(commitEvery_tMSSqlOutput_2 &amp;lt;= commitCounter_tMSSqlOutput_2) {
                if ((batchSize_tMSSqlOutput_2 &amp;gt; 0) &amp;amp;&amp;amp; (batchSizeCounter_tMSSqlOutput_2 &amp;gt; 0)) {
    		            
            	    		updatedCount_tMSSqlOutput_2 = new LimitBytesHelper_tMSSqlOutput_2().limitBytePart1(updatedCount_tMSSqlOutput_2,pstmt_tMSSqlOutput_2);
            	    	
            	batchSizeCounter_tMSSqlOutput_2 = 0;
            	}
                	
                if(log.isDebugEnabled())
            log.debug("tMSSqlOutput_2 - "  + ("Connection starting to commit ")  + (commitCounter_tMSSqlOutput_2)  + (" record(s).") );
                	conn_tMSSqlOutput_2.commit();
            		
                if(log.isDebugEnabled())
            log.debug("tMSSqlOutput_2 - "  + ("Connection commit has succeeded.") );
                	commitCounter_tMSSqlOutput_2=0;
                }

 


	tos_count_tMSSqlOutput_2++;

/**
 * [tMSSqlOutput_2 main ] stop
 */&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2018 22:23:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314724#M85463</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-22T22:23:57Z</dc:date>
    </item>
    <item>
      <title>Re: Slow SQL Server updates</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314725#M85464</link>
      <description>&lt;P&gt;You should be able to switch to the code screen and hit ctrl+F to bring up a find box. You can edit the code, but you can search it. The code you copied and pasted isn't all of it for the tMSSqlOutput. There is a lot more. Here is an example I quickly knocked up. This isn't configured for use, but just dumped onto a job and configured to carry out an update. You will notice there is a section of code like this....&lt;/P&gt; 
  &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
  &lt;PRE&gt;&lt;STRONG&gt;String update_tMSSqlOutput_&lt;/STRONG&gt;1 = "UPDATE ["
						+ tableName_tMSSqlOutput_1
						+ "] SET [newColumn] = ?,[newColumn1] = ?,[newColumn2] = ?,[newColumn3] = ?,[newColumn4] = ? WHERE [newColumn3] = ? AND [newColumn4] = ?";&lt;/PRE&gt; 
  &lt;P&gt;I've highlighted in bold what you should search for in your job. I assume you are using Talend 6.something? If so this code will be there if you have your component configured for an update.&lt;/P&gt; 
  &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
 &lt;BR /&gt;&lt;BR /&gt;To see the whole post, download it &lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009Md7T"&gt;here&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009Md7T"&gt;OriginalPost.pdf&lt;/A&gt;</description>
      <pubDate>Thu, 22 Mar 2018 22:39:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314725#M85464</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-22T22:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: Slow SQL Server updates</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314726#M85465</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;HR /&gt; 
 &lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;wrote: 
 &lt;BR /&gt; 
 &lt;P&gt;You should be able to switch to the code screen and hit ctrl+F to bring up a find box.&lt;/P&gt; 
 &lt;HR /&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;P&gt;Must be a difference between Windows and Mac.&amp;nbsp; On Mac, it would be command-F to bring up search -- which works in most places but nothing happens in Talend.&amp;nbsp; I tried control-F, also, but no response.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;HR /&gt; 
 &lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;wrote: 
 &lt;BR /&gt; 
 &lt;P&gt;The code you copied and pasted isn't all of it for the tMSSqlOutput.&lt;/P&gt; 
 &lt;HR /&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;P&gt;The code I pasted is all that appears in the Code Viewer window when I have the tMSSqlOutput_2 job selected.&amp;nbsp; You can see the start and stop comments from top and bottom of what displays in the viewer -- pasted again, below.&amp;nbsp; Maybe another difference between Windows and Mac?&amp;nbsp; Hmmm...&amp;nbsp; I'm going to use SQL Server Profiler to try and look at the SQL coming in.&amp;nbsp; But I'd really like to know why I don't see what you see.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;/**
* [tMSSqlOutput_2 main ] start
*/
&lt;BR /&gt;...&lt;BR /&gt;
/**
* [tMSSqlOutput_2 main ] stop
*/&lt;/PRE&gt; 
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2018 15:18:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314726#M85465</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-23T15:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: Slow SQL Server updates</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314727#M85466</link>
      <description>&lt;P&gt;I was using a Mac at the time but was assuming you were using Windows when I suggested that.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I've just realised what you are doing wrong. I was not talking about the Code Viewer (its useless in my eyes). I was talking about about the "Code" tab at the bottom left of the design window....&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CodeTab.png" style="width: 293px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LtBs.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/146755iC6A771C3CE3F02D7/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LtBs.png" alt="0683p000009LtBs.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Click that and you will see the whole code for the job. It is also useful when looking for compilation errors or trying to identify errors in error stacks. In fact, you should be spending a lot of time looking at this to quickly debug issues.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2018 15:26:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314727#M85466</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-23T15:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: Slow SQL Server updates</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314728#M85467</link>
      <description>&lt;P&gt;Ah, yes, that is more helpful.&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt;&amp;nbsp; I agree about the "Code Viewer" window -- seems pointless given the ability to view the "Code" tab of the designer.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Clearly the key column is being used in the WHERE clause -- it appears in the Talend statement:&lt;/SPAN&gt;&lt;/P&gt; 
&lt;PRE&gt;String update_tMSSqlOutput_2 = "UPDATE ["
	+ tableName_tMSSqlOutput_2
	+ "] SET [customer_name] = ?,[ship_address] = ?,[ship_postalcode] = ?,[ship_city] = ?,[ship_county] = ?,[ship_state] = ?,[ship_country] = ?,[mktsegcode] = ?,[crc] = ? WHERE [cmf] = ?";&lt;/PRE&gt; 
&lt;P&gt;And in the resulting line shown in SQL Profiler:&lt;/P&gt; 
&lt;PRE&gt;exec sp_prepare @p1 output,N'@P0 nvarchar(4000),@P1 nvarchar(4000),@P2 nvarchar(4000),@P3 nvarchar(4000),@P4 nvarchar(4000),@P5 nvarchar(4000),@P6 nvarchar(4000),@P7 nvarchar(4000),@P8 bigint,@P9 nvarchar(4000)',N'UPDATE [dbo].[customer] SET [customer_name] =  @P0 ,[ship_address] =  @P1 ,[ship_postalcode] =  @P2 ,[ship_city] =  @P3 ,[ship_county] =  @P4 ,[ship_state] =  @P5 ,[ship_country] =  @P6 ,[mktsegcode] =  @P7 ,[crc] =  @P8  WHERE [cmf] =  @P9 ',1&lt;/PRE&gt; 
&lt;P&gt;Which is followed by (for each row):&lt;/P&gt; 
&lt;PRE&gt;exec sp_execute 1,...&lt;/PRE&gt; 
&lt;P&gt;NOTE: It is interesting that the sp_prepare&amp;nbsp;shows&amp;nbsp;nvarchar(4000) for every string parameter despite each column being defined explicitly as varchar(n) with an appropriate length.&amp;nbsp; But this is probably a generic thing done for all parameters since it requires NVARCHAR.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I did find the article&amp;nbsp;&lt;A href="https://blogs.msdn.microsoft.com/sqlcat/2010/12/21/watch-out-those-prepared-sql-statements/" target="_self" rel="nofollow noopener noreferrer"&gt;Watch out those prepared SQL statements&lt;/A&gt;.&amp;nbsp; It indicates that use of sp_prepare/sp_execute is typical of&amp;nbsp;ODBC, OLEDB, and, apparently, JDBC.&amp;nbsp; But it also points out a potential issue with the sp_unprepare not always being triggered.&amp;nbsp; I'm not sure of the impact of that but I wouldn't suspect it is related to&amp;nbsp;what I am seeing.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I'm completely stumped at this point.&amp;nbsp; I have no explanation for the poor performance compared to Datastage.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2018 16:07:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314728#M85467</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-23T16:07:46Z</dc:date>
    </item>
    <item>
      <title>Re: Slow SQL Server updates</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314729#M85468</link>
      <description>&lt;P&gt;I wish I could offer more help, but without actually seeing the issue and being able to hack around, it is very hard. As my screenshots showed you, Talend is capable of much better performance than you are seeing for both inserts and updates. I'd actually be interested to try out Datastage to get some comparisons of my own (I came from a pure SQL with DB links ETL to Informatica background). If you have a Talend license, I would advise contacting Talend support and asking them for a WebEx session so that they can see exactly what you have and maybe have a bit of a look around.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2018 16:33:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314729#M85468</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-23T16:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: Slow SQL Server updates</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314730#M85469</link>
      <description>&lt;P&gt;I appreciate all you have contributed to this conversation.&amp;nbsp; I'll end this thread for now until I (hopefully) come up with a resolution.&amp;nbsp; Meanwhile, I'll close with this information:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Using SQL Profiler&amp;nbsp;I&amp;nbsp;traced each of the Talend and Datastage jobs&amp;nbsp;and saved the trace which I include below.&amp;nbsp; (I have included only a single sp_execute as they are all the same for each row except for the content being passed in.)&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The only differences in their output was this:&lt;/P&gt; 
&lt;UL&gt; 
 &lt;LI&gt;Talend (using jDTS/JDBC): 
  &lt;UL&gt; 
   &lt;LI&gt;Forces everything to unicode in the sp_prepare and defaults parameters to maximum size. 
    &lt;UL&gt; 
     &lt;LI&gt;From researching this on the 'net, this seems to be a standard practice with JDBC due to Java being unicode by default.&lt;/LI&gt; 
     &lt;LI&gt;I don't understand why it doesn't respect the column definitions and just maxes the parameter size.&amp;nbsp; Not sure that has an impact on the issue covered in this thread but it seems sloppy.&lt;/LI&gt; 
     &lt;LI&gt;Note that Datastage (using OLEDB) does use the column definitions.&lt;/LI&gt; 
    &lt;/UL&gt;&lt;/LI&gt; 
   &lt;LI&gt;Does not issue a closing sp_unprepare or reset IMPLICIT_TRANSACTIONS. 
    &lt;UL&gt; 
     &lt;LI&gt;Personally, I think this is not a good thing though I don't know that it has any impact on the issue I am covering in this thread.&amp;nbsp; Again, it just seems sloppy.&lt;/LI&gt; 
     &lt;LI&gt;&lt;P&gt;Note that Datastage does reset the IMPLICIT_TRANSACTIONS to off and closes with sp_unprepare&lt;/P&gt;&lt;/LI&gt; 
    &lt;/UL&gt;&lt;/LI&gt; 
  &lt;/UL&gt;&lt;/LI&gt; 
&lt;/UL&gt; 
&lt;P&gt;Talend&lt;/P&gt; 
&lt;PRE&gt;-- network protocol: TCP/IP
set quoted_identifier on
set arithabort off
set numeric_roundabort off
set ansi_warnings on
set ansi_padding on
set ansi_nulls on
set concat_null_yields_null on
set cursor_close_on_commit off
set implicit_transactions off
set language us_english
set dateformat mdy
set datefirst 7
set transaction isolation level read committed

SELECT @@MAX_PRECISION
SET TRANSACTION ISOLATION LEVEL READ COMMITTED
SET IMPLICIT_TRANSACTIONS OFF
SET QUOTED_IDENTIFIER ON
SET TEXTSIZE 2147483647

SET IMPLICIT_TRANSACTIONS ON

declare @p1 int
set @p1=1
exec sp_prepare @p1 output,N'@P0 nvarchar(4000),@P1 nvarchar(4000),@P2 nvarchar(4000),@P3 nvarchar(4000),@P4 nvarchar(4000),@P5 nvarchar(4000),@P6 nvarchar(4000),@P7 nvarchar(4000),@P8 bigint,@P9 nvarchar(4000)',N'UPDATE [dbo].[customer] SET [customer_name] =  @P0 ,[ship_address] =  @P1 ,[ship_postalcode] =  @P2 ,[ship_city] =  @P3 ,[ship_county] =  @P4 ,[ship_state] =  @P5 ,[ship_country] =  @P6 ,[mktsegcode] =  @P7 ,[crc] =  @P8  WHERE [cmf] =  @P9 ',1
select @p1

exec sp_execute 1,N'...

IF @@TRANCOUNT &amp;gt; 0 COMMIT TRAN&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Datastage&lt;/P&gt; 
&lt;PRE&gt;-- network protocol: TCP/IP
set quoted_identifier on
set arithabort off
set numeric_roundabort off
set ansi_warnings on
set ansi_padding on
set ansi_nulls on
set concat_null_yields_null on
set cursor_close_on_commit off
set implicit_transactions off
set language us_english
set dateformat mdy
set datefirst 7
set transaction isolation level read committed

set implicit_transactions on 

declare @p1 int
set @p1=1
exec sp_prepare @p1 output,N'@P1 varchar(50),@P2 varchar(240),@P3 varchar(10),@P4 varchar(60),@P5 varchar(60),@P6 char(2),@P7 char(4),@P8 varchar(2),@P9 bigint,@P10 char(8)',N'UPDATE customer SET customer_name=@P1,ship_address=@P2,ship_postalcode=@P3,ship_city=@P4,ship_county=@P5,ship_state=@P6,ship_country=@P7,mktsegcode=@P8,crc=@P9 WHERE cmf=@P10',1
select @p1

exec sp_execute 1,'...

IF @@TRANCOUNT &amp;gt; 0 COMMIT TRAN

set implicit_transactions off 

exec sp_unprepare 1&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2018 22:42:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314730#M85469</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-23T22:42:35Z</dc:date>
    </item>
    <item>
      <title>Re: Slow SQL Server updates</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314731#M85470</link>
      <description>&lt;P&gt;Not wishing to steal the last word, but I just had a thought which might help with your investigation. At the moment you are using the components in a way which lets them handle commits for you. You can take control of this and manually create a connection, perform your updates/inserts/deletes and then commit or rollback at the end. I mainly work in this way if I have to ensure a successful atomic&amp;nbsp;transaction or rollback. But it *might* help with your problem. Take a look at this page which shows how to do this.....&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;A href="https://help.talend.com/reader/iYcvdknuprDzYycT3WRU8w/tR5sAkr~80fPFhrYZNlNWQ" target="_blank" rel="nofollow noopener noreferrer"&gt;https://help.talend.com/reader/iYcvdknuprDzYycT3WRU8w/tR5sAkr~80fPFhrYZNlNWQ&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Mar 2018 01:16:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314731#M85470</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-24T01:16:13Z</dc:date>
    </item>
    <item>
      <title>Re: Slow SQL Server updates</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314732#M85471</link>
      <description>&lt;P&gt;I originally had this job using a shared connection but had moved back from that to connections in the components in an effort to simplify the job and determine why it was slow.&amp;nbsp; I'll keep in mind the option you have suggested here.&lt;/P&gt;</description>
      <pubDate>Sat, 24 Mar 2018 03:12:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Slow-SQL-Server-updates/m-p/2314732#M85471</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-24T03:12:55Z</dc:date>
    </item>
  </channel>
</rss>

