<?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: select disctinct query with effective performance in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-disctinct-query-with-effective-performance/m-p/9784460#M1777955</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 check which index are used while selecting, probably the index for material should be used for EKPO, but no (standard) index is based on field memory for EKKO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So your query (I suppose all systems are technically similar) is faster in the system with few records, if you can't create an index on field memory, probably it's better filtered it after selecting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&amp;nbsp; &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;SELECT &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;DISTINCT p&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;~&lt;/SPAN&gt;&lt;/SPAN&gt;matnr p&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;~&lt;/SPAN&gt;werks k&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;~&lt;/SPAN&gt;memry &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;INTO &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;TABLE &lt;/SPAN&gt;itab&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;FROM &lt;/SPAN&gt;ekpo &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;AS p&lt;/SPAN&gt; INNER &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;JOIN &lt;/SPAN&gt;ekko &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;AS &lt;/SPAN&gt;k&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;ON &lt;/SPAN&gt;p&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;~&lt;/SPAN&gt;ebeln &lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;= &lt;/SPAN&gt;k&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;~&lt;/SPAN&gt;ebeln&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;WHERE &lt;/SPAN&gt;p&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;~&lt;/SPAN&gt;matnr &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;GT &lt;/SPAN&gt;&lt;SPAN class="L0S33" style="font-style: inherit; font-family: inherit;"&gt;' '&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;AND &lt;/SPAN&gt;p&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;~&lt;/SPAN&gt;matnr &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;IN &lt;/SPAN&gt;s_matnr&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;AND &lt;/SPAN&gt;p&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;~&lt;/SPAN&gt;werks &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;IN &lt;/SPAN&gt;s_werks&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;AND &lt;/SPAN&gt;p&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;~&lt;/SPAN&gt;bstyp &lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;= &lt;/SPAN&gt;c_bstyp&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;AND &lt;/SPAN&gt;p&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;~&lt;/SPAN&gt;loekz &lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S33" style="font-style: inherit; font-family: inherit;"&gt;' '&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;AND &lt;/SPAN&gt;p&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;~&lt;/SPAN&gt;elikz &lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S33" style="font-style: inherit; font-family: inherit;"&gt;' '&lt;/SPAN&gt;&lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;&lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;delete itab where memory &amp;lt;&amp;gt; space.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;&lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;sort itab.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;&lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;delete &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;delete adjaecent duplicate from itab comparing all fields.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;Max &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;&lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Oct 2013 12:36:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2013-10-10T12:36:31Z</dc:date>
    <item>
      <title>select disctinct query with effective performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-disctinct-query-with-effective-performance/m-p/9784459#M1777954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is 1 query written which is executing fast in 1 system but same query when applying on other server...taking lot of time.&lt;/P&gt;&lt;P&gt;Though it is simple but i would like to understand the logic behind this,,.and is their any effective way to write the same query...... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i guess for all entries we can use..and delete adjacent duplicates but my doubt is about this query?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yes in both server programs..i am not giving any data on selection screen , which has select option as &lt;STRONG&gt;ekpo-MATNR, ekpo-WERKS, and mdez-AUSSL &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;i think may be more records in the table. but what is the other best way to write the same&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN class="L0S52"&gt;SELECT &lt;SPAN class="L0S52"&gt;DISTINCT &lt;/SPAN&gt;matnr werks &lt;SPAN class="L0S52"&gt;INTO &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TABLE &lt;/SPAN&gt;itab&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;FROM &lt;/SPAN&gt;ekpo &lt;SPAN class="L0S52"&gt;AS p&lt;/SPAN&gt; INNER &lt;SPAN class="L0S52"&gt;JOIN &lt;/SPAN&gt;ekko &lt;SPAN class="L0S52"&gt;AS &lt;/SPAN&gt;k&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;ON &lt;/SPAN&gt;p&lt;SPAN class="L0S70"&gt;~&lt;/SPAN&gt;ebeln &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;k&lt;SPAN class="L0S70"&gt;~&lt;/SPAN&gt;ebeln&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;WHERE &lt;/SPAN&gt;p&lt;SPAN class="L0S70"&gt;~&lt;/SPAN&gt;matnr &lt;SPAN class="L0S52"&gt;GT &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;' '&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;AND &lt;/SPAN&gt;p&lt;SPAN class="L0S70"&gt;~&lt;/SPAN&gt;matnr &lt;SPAN class="L0S52"&gt;IN &lt;/SPAN&gt;s_matnr&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;AND &lt;/SPAN&gt;p&lt;SPAN class="L0S70"&gt;~&lt;/SPAN&gt;werks &lt;SPAN class="L0S52"&gt;IN &lt;/SPAN&gt;s_werks&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;AND &lt;/SPAN&gt;p&lt;SPAN class="L0S70"&gt;~&lt;/SPAN&gt;bstyp &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;c_bstyp&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;AND &lt;/SPAN&gt;p&lt;SPAN class="L0S70"&gt;~&lt;/SPAN&gt;loekz &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;' '&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;AND &lt;/SPAN&gt;p&lt;SPAN class="L0S70"&gt;~&lt;/SPAN&gt;elikz &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;' '&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;AND &lt;/SPAN&gt;k&lt;SPAN class="L0S70"&gt;~&lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;memory &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;' '&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through; color: #ff0000;"&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;Please suggest, points will given accordingly.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;thanks&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;Moderator message - Offering points is against the forum rules of engagement.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Suhas Saha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Oct 2013 12:17:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-disctinct-query-with-effective-performance/m-p/9784459#M1777954</guid>
      <dc:creator>former_member391265</dc:creator>
      <dc:date>2013-10-10T12:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: select disctinct query with effective performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-disctinct-query-with-effective-performance/m-p/9784460#M1777955</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 check which index are used while selecting, probably the index for material should be used for EKPO, but no (standard) index is based on field memory for EKKO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So your query (I suppose all systems are technically similar) is faster in the system with few records, if you can't create an index on field memory, probably it's better filtered it after selecting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&amp;nbsp; &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;SELECT &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;DISTINCT p&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;~&lt;/SPAN&gt;&lt;/SPAN&gt;matnr p&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;~&lt;/SPAN&gt;werks k&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;~&lt;/SPAN&gt;memry &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;INTO &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;TABLE &lt;/SPAN&gt;itab&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;FROM &lt;/SPAN&gt;ekpo &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;AS p&lt;/SPAN&gt; INNER &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;JOIN &lt;/SPAN&gt;ekko &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;AS &lt;/SPAN&gt;k&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;ON &lt;/SPAN&gt;p&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;~&lt;/SPAN&gt;ebeln &lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;= &lt;/SPAN&gt;k&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;~&lt;/SPAN&gt;ebeln&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;WHERE &lt;/SPAN&gt;p&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;~&lt;/SPAN&gt;matnr &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;GT &lt;/SPAN&gt;&lt;SPAN class="L0S33" style="font-style: inherit; font-family: inherit;"&gt;' '&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;AND &lt;/SPAN&gt;p&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;~&lt;/SPAN&gt;matnr &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;IN &lt;/SPAN&gt;s_matnr&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;AND &lt;/SPAN&gt;p&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;~&lt;/SPAN&gt;werks &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;IN &lt;/SPAN&gt;s_werks&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;AND &lt;/SPAN&gt;p&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;~&lt;/SPAN&gt;bstyp &lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;= &lt;/SPAN&gt;c_bstyp&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;AND &lt;/SPAN&gt;p&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;~&lt;/SPAN&gt;loekz &lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S33" style="font-style: inherit; font-family: inherit;"&gt;' '&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;AND &lt;/SPAN&gt;p&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;~&lt;/SPAN&gt;elikz &lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S33" style="font-style: inherit; font-family: inherit;"&gt;' '&lt;/SPAN&gt;&lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;&lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;delete itab where memory &amp;lt;&amp;gt; space.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;&lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;sort itab.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;&lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;delete &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;delete adjaecent duplicate from itab comparing all fields.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;Max &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;&lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Oct 2013 12:36:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-disctinct-query-with-effective-performance/m-p/9784460#M1777955</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-10-10T12:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: select disctinct query with effective performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-disctinct-query-with-effective-performance/m-p/9784461#M1777956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You guessed it already, most likely you'll have (many) more entries in EKKO/EKPO in the system with the long response time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a very simple rule for self-help, study the available indexes (primary and secondary) of the involved tables, and try to come up with WHERE-conditions that can make effective use of at least one of these indexes. Effective as in having EQ-conditions, or IN-conditions with small ranges, for as many top-down fields of an index as possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Oct 2013 12:39:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-disctinct-query-with-effective-performance/m-p/9784461#M1777956</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2013-10-10T12:39:28Z</dc:date>
    </item>
  </channel>
</rss>

