<?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>question putDatabaseRecord really slow in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/putDatabaseRecord-really-slow/m-p/384664#M245452</link>
    <description>&lt;P&gt;Hi there,&lt;BR /&gt;&lt;BR /&gt;I am experiencing really slow ingestion with&amp;nbsp;putDatabaseRecord process.&lt;BR /&gt;The flow is simple - query data from mySQL 5.6 and ingesting it into redshift.&lt;BR /&gt;Currently im just testing it so I list only specific tables from those 2 databases and then I query 'select * from $db.tablename' - but the ingestion using&amp;nbsp;putDatabaseRecord is terribly slow (100 rows 5min).&lt;BR /&gt;I am using AvroReader inside&amp;nbsp;putDatabaseRecord but didnt make any changes to the avroreader - I just make sure flow files be small (100 rows).&lt;BR /&gt;Does AvroReader split the 100 rows into 100 SQL statements?&lt;BR /&gt;How do I fix this to have better performance?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LiranJP_0-1709733671035.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/39987iE34727EE204F4CAA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LiranJP_0-1709733671035.png" alt="LiranJP_0-1709733671035.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LiranJP_1-1709734035670.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/39988iF291ACE03201DAFE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LiranJP_1-1709734035670.png" alt="LiranJP_1-1709734035670.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LiranJP_2-1709734068649.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/39989i41AD66BB233203D5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LiranJP_2-1709734068649.png" alt="LiranJP_2-1709734068649.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LiranJP_3-1709734081736.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/39990i67A681C38641BE92/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LiranJP_3-1709734081736.png" alt="LiranJP_3-1709734081736.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LiranJP_4-1709734109009.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/39991i7C23146266FBB143/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LiranJP_4-1709734109009.png" alt="LiranJP_4-1709734109009.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 06 Mar 2024 14:10:04 GMT</pubDate>
    <dc:creator>LiranJP</dc:creator>
    <dc:date>2024-03-06T14:10:04Z</dc:date>
    <item>
      <title>putDatabaseRecord really slow</title>
      <link>https://community.cloudera.com/t5/Support-Questions/putDatabaseRecord-really-slow/m-p/384664#M245452</link>
      <description>&lt;P&gt;Hi there,&lt;BR /&gt;&lt;BR /&gt;I am experiencing really slow ingestion with&amp;nbsp;putDatabaseRecord process.&lt;BR /&gt;The flow is simple - query data from mySQL 5.6 and ingesting it into redshift.&lt;BR /&gt;Currently im just testing it so I list only specific tables from those 2 databases and then I query 'select * from $db.tablename' - but the ingestion using&amp;nbsp;putDatabaseRecord is terribly slow (100 rows 5min).&lt;BR /&gt;I am using AvroReader inside&amp;nbsp;putDatabaseRecord but didnt make any changes to the avroreader - I just make sure flow files be small (100 rows).&lt;BR /&gt;Does AvroReader split the 100 rows into 100 SQL statements?&lt;BR /&gt;How do I fix this to have better performance?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LiranJP_0-1709733671035.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/39987iE34727EE204F4CAA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LiranJP_0-1709733671035.png" alt="LiranJP_0-1709733671035.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LiranJP_1-1709734035670.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/39988iF291ACE03201DAFE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LiranJP_1-1709734035670.png" alt="LiranJP_1-1709734035670.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LiranJP_2-1709734068649.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/39989i41AD66BB233203D5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LiranJP_2-1709734068649.png" alt="LiranJP_2-1709734068649.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LiranJP_3-1709734081736.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/39990i67A681C38641BE92/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LiranJP_3-1709734081736.png" alt="LiranJP_3-1709734081736.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LiranJP_4-1709734109009.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/39991i7C23146266FBB143/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LiranJP_4-1709734109009.png" alt="LiranJP_4-1709734109009.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 14:10:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/putDatabaseRecord-really-slow/m-p/384664#M245452</guid>
      <dc:creator>LiranJP</dc:creator>
      <dc:date>2024-03-06T14:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: putDatabaseRecord really slow</title>
      <link>https://community.cloudera.com/t5/Support-Questions/putDatabaseRecord-really-slow/m-p/384674#M245454</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/109512"&gt;@LiranJP&lt;/a&gt;&amp;nbsp;Welcome to the Cloudera Community!&lt;BR /&gt;&lt;BR /&gt;To help you get the best possible solution, I have tagged our NiFi experts&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/38301"&gt;@mburgess&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35454"&gt;@MattWho&lt;/a&gt;&amp;nbsp;&amp;nbsp;who may be able to assist you further.&lt;BR /&gt;&lt;BR /&gt;Please keep us updated on your post, and we hope you find a satisfactory solution to your query.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 17:05:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/putDatabaseRecord-really-slow/m-p/384674#M245454</guid>
      <dc:creator>DianaTorres</dc:creator>
      <dc:date>2024-03-06T17:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: putDatabaseRecord really slow</title>
      <link>https://community.cloudera.com/t5/Support-Questions/putDatabaseRecord-really-slow/m-p/384690#M245456</link>
      <description>&lt;P&gt;How is your DBCPConnectionPool configured?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 21:07:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/putDatabaseRecord-really-slow/m-p/384690#M245456</guid>
      <dc:creator>mburgess</dc:creator>
      <dc:date>2024-03-06T21:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: putDatabaseRecord really slow</title>
      <link>https://community.cloudera.com/t5/Support-Questions/putDatabaseRecord-really-slow/m-p/384724#M245459</link>
      <description>&lt;P&gt;That's the redshift connection:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LiranJP_0-1709792776559.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/40003iFCB96294F590A6BB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LiranJP_0-1709792776559.png" alt="LiranJP_0-1709792776559.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LiranJP_1-1709792792457.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/40004iE9DB697AE261C6CB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LiranJP_1-1709792792457.png" alt="LiranJP_1-1709792792457.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;That's the mySQL connection:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LiranJP_2-1709792941484.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/40005i6E753A4B48C53D96/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LiranJP_2-1709792941484.png" alt="LiranJP_2-1709792941484.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LiranJP_3-1709792955258.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/40006i049AC1960411C749/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LiranJP_3-1709792955258.png" alt="LiranJP_3-1709792955258.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I do understand that INSERTs on redshift might be slow and that's why people are using COPY command but 100 rows in 5min is weird.&lt;BR /&gt;I know that for BigQuery for example there's a dedicated processor in order to load data but couldn't find anything for RedShift so that's why I am using&amp;nbsp;&lt;SPAN&gt;putDatabaseRecord.&lt;BR /&gt;&lt;BR /&gt;Edit - After I loaded 100 rows I exported the same 100 rows into an INSERT SQL statement and run it directly on the redshift, this task took 1.1 second.&lt;BR /&gt;Edit2 - Since im the kind of guy that loves doing my job and to find solution I found this -&lt;BR /&gt;&lt;EM&gt;reWriteBatchedInserts=true;reWriteBatchedInsertsSize=102400;&lt;/EM&gt;&lt;BR /&gt;&lt;/SPAN&gt;I found this on some reddit post by chance, this is working way better now but I couldn't find some details regard those parameters to make them optimized and still that's not the best (still little bit slow).&lt;BR /&gt;&lt;BR /&gt;I am not sure that's the solution so i'm still waiting for your input as well.&lt;BR /&gt;Also, if I would like to change it to drop the Avro/flow files into S3 and then execute COPY command from NIFI is it possible?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 08:46:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/putDatabaseRecord-really-slow/m-p/384724#M245459</guid>
      <dc:creator>LiranJP</dc:creator>
      <dc:date>2024-03-07T08:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: putDatabaseRecord really slow</title>
      <link>https://community.cloudera.com/t5/Support-Questions/putDatabaseRecord-really-slow/m-p/384809#M245492</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/38301"&gt;@mburgess&lt;/a&gt;&amp;nbsp;Any update from your side?&lt;/P&gt;</description>
      <pubDate>Sun, 10 Mar 2024 07:10:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/putDatabaseRecord-really-slow/m-p/384809#M245492</guid>
      <dc:creator>LiranJP</dc:creator>
      <dc:date>2024-03-10T07:10:29Z</dc:date>
    </item>
  </channel>
</rss>

