<?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: Interchanging primary key fields in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/interchanging-primary-key-fields/m-p/7366593#M1542433</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The number and names of the primary key fields remain the same, so there should not be a problem with duplicate keys or losing data. There might be a problem with programs expecting the current sequence of fields, which might have serious performance problems once you change the order of the primary key fields. You should check that in advance.&lt;/P&gt;&lt;P&gt;Make sure you test this in a sandbox or test system with lots of data, compare table contents before and after.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Oct 2010 16:19:09 GMT</pubDate>
    <dc:creator>ThomasZloch</dc:creator>
    <dc:date>2010-10-20T16:19:09Z</dc:date>
    <item>
      <title>Interchanging primary key fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/interchanging-primary-key-fields/m-p/7366591#M1542431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Can we interchange primary key fields?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example: I have a table in which the the primay keys are Mandt, Kunnr, Country_code,Vbeln, Posnr.&lt;/P&gt;&lt;P&gt;And this table is in production.&lt;/P&gt;&lt;P&gt;Now can i interchange the order of primary key fields to Mandt,Vbeln, Posnr,Kunnr,Country_code and then transport to production?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will there be any problem by doing this?&lt;/P&gt;&lt;P&gt;Should i perform Runstats after this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Robin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Oct 2010 10:37:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/interchanging-primary-key-fields/m-p/7366591#M1542431</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-20T10:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: Interchanging primary key fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/interchanging-primary-key-fields/m-p/7366592#M1542432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;interchange primary key fields&lt;/EM&gt; means that two steps will be executed:&lt;/P&gt;&lt;P&gt;1) drop old index&lt;/P&gt;&lt;P&gt;2) create new index&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the same precautions have to be taken as when simply creating a new index.&lt;/P&gt;&lt;P&gt;There may be a table lock, and this may last for an hour or longer in case it is a &lt;EM&gt;huge&lt;/EM&gt; table.&lt;/P&gt;&lt;P&gt;Have a look at SAP Note 334224 - Important notes for creating indexes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And for a &lt;EM&gt;primary&lt;/EM&gt; key (or any kind of &lt;EM&gt;unique&lt;/EM&gt; index) you might face the (not very likely) problem that you have got &lt;EM&gt;duplicate keys&lt;/EM&gt; during the short time when there was no primary key. Be prepared!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whether or not you have to update statistics afterwards will depend on your database. You didn't tell us.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Oct 2010 12:01:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/interchanging-primary-key-fields/m-p/7366592#M1542432</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-20T12:01:40Z</dc:date>
    </item>
    <item>
      <title>Re: Interchanging primary key fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/interchanging-primary-key-fields/m-p/7366593#M1542433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The number and names of the primary key fields remain the same, so there should not be a problem with duplicate keys or losing data. There might be a problem with programs expecting the current sequence of fields, which might have serious performance problems once you change the order of the primary key fields. You should check that in advance.&lt;/P&gt;&lt;P&gt;Make sure you test this in a sandbox or test system with lots of data, compare table contents before and after.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Oct 2010 16:19:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/interchanging-primary-key-fields/m-p/7366593#M1542433</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2010-10-20T16:19:09Z</dc:date>
    </item>
  </channel>
</rss>

