<?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: Performance issue with Insert ACCEPTING DUPLICATE KEYS. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-insert-accepting-duplicate-keys/m-p/1424428#M203501</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think ACCEPTING DUPLICATE KEYS should add to the performance issue. 8 million records is huge.&lt;/P&gt;&lt;P&gt;You might want to consider breaking your internal table into smaller chunks and issue multiple insert statements followed by a commit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;Note : Please mark all the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Jun 2006 14:17:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-06-27T14:17:01Z</dc:date>
    <item>
      <title>Performance issue with Insert ACCEPTING DUPLICATE KEYS.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-insert-accepting-duplicate-keys/m-p/1424427#M203500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Data Base experts,&lt;/P&gt;&lt;P&gt;               &lt;/P&gt;&lt;P&gt;         We are using INSERT with ACCEPTING DUPLICATE KEYS in one of our Z table.    This is causing performance issue job got struck at this insert and sitting there for a hours .   the z table contains nearly 8 millions of records.   all these records are created by this insert statement .   This insert is not in between loop / end loop.   This is the code .     &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  INSERT ztable FROM TABLE it_links ACCEPTING DUPLICATE KEYS. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; My question. &lt;/P&gt;&lt;P&gt;Is ACCEPTING DUPLICATE KEYS addision take time.  What we need to consider the performace wise . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jun 2006 14:12:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-insert-accepting-duplicate-keys/m-p/1424427#M203500</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-27T14:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue with Insert ACCEPTING DUPLICATE KEYS.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-insert-accepting-duplicate-keys/m-p/1424428#M203501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think ACCEPTING DUPLICATE KEYS should add to the performance issue. 8 million records is huge.&lt;/P&gt;&lt;P&gt;You might want to consider breaking your internal table into smaller chunks and issue multiple insert statements followed by a commit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;Note : Please mark all the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jun 2006 14:17:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-insert-accepting-duplicate-keys/m-p/1424428#M203501</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-27T14:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue with Insert ACCEPTING DUPLICATE KEYS.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-insert-accepting-duplicate-keys/m-p/1424429#M203502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ravi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reponse .  I forgot to state that we are inserting in chunks only . Not in a single shot all the 8 millions .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jun 2006 14:28:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-insert-accepting-duplicate-keys/m-p/1424429#M203502</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-27T14:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue with Insert ACCEPTING DUPLICATE KEYS.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-insert-accepting-duplicate-keys/m-p/1424430#M203503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DO you have COMMIT WORK after insering each chunk from itab?&lt;/P&gt;&lt;P&gt;If you have commit at the end of program or no commit work, the program tries to commit 8mil at the end, which is a performance issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sridhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jun 2006 14:42:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-insert-accepting-duplicate-keys/m-p/1424430#M203503</guid>
      <dc:creator>sridhar_k1</dc:creator>
      <dc:date>2006-06-27T14:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue with Insert ACCEPTING DUPLICATE KEYS.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-insert-accepting-duplicate-keys/m-p/1424431#M203504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it_links sorted by the primary key fields of ztable?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jun 2006 15:06:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-insert-accepting-duplicate-keys/m-p/1424431#M203504</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-27T15:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue with Insert ACCEPTING DUPLICATE KEYS.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-insert-accepting-duplicate-keys/m-p/1424432#M203505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No the it_links is not  sorted .  do i need to do it .  In what way it hampers the performance .  Pls advice me&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jun 2006 15:56:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-insert-accepting-duplicate-keys/m-p/1424432#M203505</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-27T15:56:06Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue with Insert ACCEPTING DUPLICATE KEYS.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-insert-accepting-duplicate-keys/m-p/1424433#M203506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sridhar , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    It is followed by a Commit work .    I am able to see the chuncks getting updated in table .   But it is very slow process&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jun 2006 15:57:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-insert-accepting-duplicate-keys/m-p/1424433#M203506</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-27T15:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue with Insert ACCEPTING DUPLICATE KEYS.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-insert-accepting-duplicate-keys/m-p/1424434#M203507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm really not sure how much it will help, but it should give some improvement. It can't hurt anything, so why not try it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jun 2006 16:21:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-insert-accepting-duplicate-keys/m-p/1424434#M203507</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-27T16:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue with Insert ACCEPTING DUPLICATE KEYS.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-insert-accepting-duplicate-keys/m-p/1424435#M203508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should try to break the inserting, I don't know how many rows you try to insert once, but if the number is very big you should do the insert for block with 1000 records (for example) and after inserting a block do a commit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jun 2006 17:17:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-insert-accepting-duplicate-keys/m-p/1424435#M203508</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-27T17:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue with Insert ACCEPTING DUPLICATE KEYS.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-insert-accepting-duplicate-keys/m-p/1424436#M203509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I would like to try to answer your question. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see you are trying to insert in zTable. I would start by investigating the internal table called it_links.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it a standard table? If not, try first sorting this table as this would be an asset for performance. By sorting the table, we will 'group' all duplicates one after the other. &lt;/P&gt;&lt;P&gt;If no explicit sort key is entered using the BY addition, the internal table itab is sorted according to the table key.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  SORT it_links BY key1 key2. 
  DELETE ADJACENT DUPLICATES FROM it_links COMPARING key1 key2.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The sorting will be done in memory. &lt;/P&gt;&lt;P&gt;Then you can break up into small blocks and update to database. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what I would try first. Use trn. st05 to calculate processing time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps. Nick.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2007 20:01:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-insert-accepting-duplicate-keys/m-p/1424436#M203509</guid>
      <dc:creator>i807822</dc:creator>
      <dc:date>2007-08-29T20:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue with Insert ACCEPTING DUPLICATE KEYS.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-insert-accepting-duplicate-keys/m-p/1424437#M203510</link>
      <description>&lt;P&gt;Hi;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;I'm wondering something about your answer.


INSERT ztable FROM TABLE it_links ACCEPTING DUPLICATE KEYS.


is not  this code comparing ztable and it_links dublicate fields

but your code compares dublicate records only ın it_links table

 SORT it_links BY key1 key2. 
  DELETE ADJACENT DUPLICATES FROM it_links COMPARING key1 key2.

am I right ? or do I think wrongly&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 27 Sep 2021 12:55:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-insert-accepting-duplicate-keys/m-p/1424437#M203510</guid>
      <dc:creator>former_member792891</dc:creator>
      <dc:date>2021-09-27T12:55:57Z</dc:date>
    </item>
  </channel>
</rss>

