<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/1398641#M192866</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Always check the driver internal tables is not empty, while using FOR ALL ENTRIES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Avoid for all entries in JOINS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Try to avoid joins and use FOR ALL ENTRIES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Try to restrict the joins to 1 level only ie only for  tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Avoid using Select *.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Avoid having multiple Selects from the same table in the same object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Try to minimize the number of variables to save memory.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; The sequence of fields in 'where clause' must be as per primary/secondary index ( if any)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Avoid creation of&amp;nbsp; index as far as possible&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Avoid operators like&amp;nbsp; &amp;lt;&amp;gt;, &amp;gt; , &amp;lt; &amp;amp; like % in where clause conditions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Avoid select/select single statements in loops.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Try to use 'binary search' in READ internal table. Ensure table is sorted before using BINARY SEARCH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Avoid using aggregate functions&amp;nbsp; (SUM, MAX etc) in selects ( GROUP BY , HAVING,)&amp;nbsp;  &lt;/P&gt;&lt;P&gt; Avoid using&amp;nbsp; ORDER&amp;nbsp; BY in selects&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Avoid Nested Selects&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Avoid Nested Loops of Internal Tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Try&amp;nbsp; to&amp;nbsp; use FIELD SYMBOLS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Try to avoid into Corresponding Fields of&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Avoid using Select&amp;nbsp; Distinct, Use DELETE ADJACENT&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;&lt;/P&gt;&lt;P&gt;Wasim AHmed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Jul 2006 09:54:08 GMT</pubDate>
    <dc:creator>dani_mn</dc:creator>
    <dc:date>2006-07-10T09:54:08Z</dc:date>
    <item>
      <title>PERFORMANCE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/1398640#M192865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HOW TO IMPROVE THE PERFORMANCE OF A PROGRAME&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jul 2006 09:51:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/1398640#M192865</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-10T09:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: PERFORMANCE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/1398641#M192866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Always check the driver internal tables is not empty, while using FOR ALL ENTRIES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Avoid for all entries in JOINS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Try to avoid joins and use FOR ALL ENTRIES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Try to restrict the joins to 1 level only ie only for  tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Avoid using Select *.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Avoid having multiple Selects from the same table in the same object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Try to minimize the number of variables to save memory.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; The sequence of fields in 'where clause' must be as per primary/secondary index ( if any)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Avoid creation of&amp;nbsp; index as far as possible&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Avoid operators like&amp;nbsp; &amp;lt;&amp;gt;, &amp;gt; , &amp;lt; &amp;amp; like % in where clause conditions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Avoid select/select single statements in loops.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Try to use 'binary search' in READ internal table. Ensure table is sorted before using BINARY SEARCH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Avoid using aggregate functions&amp;nbsp; (SUM, MAX etc) in selects ( GROUP BY , HAVING,)&amp;nbsp;  &lt;/P&gt;&lt;P&gt; Avoid using&amp;nbsp; ORDER&amp;nbsp; BY in selects&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Avoid Nested Selects&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Avoid Nested Loops of Internal Tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Try&amp;nbsp; to&amp;nbsp; use FIELD SYMBOLS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Try to avoid into Corresponding Fields of&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Avoid using Select&amp;nbsp; Distinct, Use DELETE ADJACENT&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;&lt;/P&gt;&lt;P&gt;Wasim AHmed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jul 2006 09:54:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/1398641#M192866</guid>
      <dc:creator>dani_mn</dc:creator>
      <dc:date>2006-07-10T09:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: PERFORMANCE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/1398642#M192867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can refer these links : &lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/performance.htm" target="test_blank"&gt;http://www.sapgenie.com/abap/performance.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jul 2006 09:54:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/1398642#M192867</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-10T09:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: PERFORMANCE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/1398643#M192868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srinivas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;chk this &lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="945562"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jul 2006 09:59:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/1398643#M192868</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-10T09:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: PERFORMANCE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/1398644#M192869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srinivas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.Avoid select * statements...tht means try using field names insted of.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.Always use the Where clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Avoid selecting useless data that you filter out later.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. Avoid using complex WHERE clauses, since the system has to break them down into several individual statements for the DB Systems..  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And we many more....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For tips on how to improve the performance of ABAPtasks use se30 transaction...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reward points if you find this as a right solution&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Harini&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jul 2006 10:04:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/1398644#M192869</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-10T10:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: PERFORMANCE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/1398645#M192870</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;   Follow the Tips &amp;amp; Tricks specified in SE30.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   And try to check the runtime analysis of the program always.&lt;/P&gt;&lt;P&gt;   Try to keep the database resource  less than 30% in SE30.&lt;/P&gt;&lt;P&gt;   Analyse the Hit List for more information on different sections of program execution time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Karthik.k&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jul 2006 10:37:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/1398645#M192870</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-10T10:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: PERFORMANCE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/1398646#M192871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai Srinivasa &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go through the following Document&lt;/P&gt;&lt;P&gt;Check the following Links&lt;/P&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;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/performance.htm" target="test_blank"&gt;http://www.sapgenie.com/abap/performance.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_PerformanceAnalysisTools.asp" target="test_blank"&gt;http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_PerformanceAnalysisTools.asp&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check the below link&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/performance-tuning-for-data-selection-statement.htm" target="test_blank"&gt;http://www.sap-img.com/abap/performance-tuning-for-data-selection-statement.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the following link if it's any help:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_PerformanceAnalysisTools.asp" target="test_blank"&gt;http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_PerformanceAnalysisTools.asp&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check also &lt;A href="http://service.sap.com/performance" target="test_blank"&gt;http://service.sap.com/performance&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and &lt;/P&gt;&lt;P&gt;books like&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-press.com/product.cfm?account=&amp;amp;product=H951" target="test_blank"&gt;http://www.sap-press.com/product.cfm?account=&amp;amp;product=H951&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-press.com/product.cfm?account=&amp;amp;product=H973" target="test_blank"&gt;http://www.sap-press.com/product.cfm?account=&amp;amp;product=H973&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm" target="test_blank"&gt;http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For all entries&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nested selects&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select using JOINS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the selection criteria&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the aggregated functions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select with view&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select with index support&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select &amp;#133; Into table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select with selection list&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Key access to multiple lines&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Copying internal tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Modifying a set of lines&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Deleting a sequence of lines&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Linear search vs. binary&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Comparison of internal tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Modify selected components&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appending two internal tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Deleting a set of lines&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tools available in SAP to pin-point a performance problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Optimizing the load of the database&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For all entries&lt;/P&gt;&lt;P&gt;The for all entries creates a where clause, where all the entries in the driver table are combined with OR. If the number of entries in the driver table is larger than rsdb/max_blocking_factor, several similar SQL statements are executed to limit the length of the WHERE clause. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The plus &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Large amount of data &lt;/P&gt;&lt;P&gt;Mixing processing and reading of data &lt;/P&gt;&lt;P&gt;Fast internal reprocessing of data &lt;/P&gt;&lt;P&gt;Fast &lt;/P&gt;&lt;P&gt;The Minus &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Difficult to program/understand &lt;/P&gt;&lt;P&gt;Memory could be critical (use FREE or PACKAGE size) &lt;/P&gt;&lt;P&gt;Some steps that might make FOR ALL ENTRIES more efficient: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Removing duplicates from the driver table &lt;/P&gt;&lt;P&gt;Sorting the driver table &lt;/P&gt;&lt;P&gt;If possible, convert the data in the driver table to ranges so a BETWEEN statement is used instead of and OR statement: &lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN i_tab&lt;/P&gt;&lt;P&gt;WHERE mykey &amp;gt;= i_tab-low and&lt;/P&gt;&lt;P&gt;mykey &amp;lt;= i_tab-high.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nested selects&lt;/P&gt;&lt;P&gt;The plus: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Small amount of data &lt;/P&gt;&lt;P&gt;Mixing processing and reading of data &lt;/P&gt;&lt;P&gt;Easy to code - and understand &lt;/P&gt;&lt;P&gt;The minus: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Large amount of data &lt;/P&gt;&lt;P&gt;when mixed processing isn&amp;#146;t needed &lt;/P&gt;&lt;P&gt;Performance killer no. 1 &lt;/P&gt;&lt;P&gt;Select using JOINS&lt;/P&gt;&lt;P&gt;The plus &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Very large amount of data &lt;/P&gt;&lt;P&gt;Similar to Nested selects - when the accesses are planned by the programmer &lt;/P&gt;&lt;P&gt;In some cases the fastest &lt;/P&gt;&lt;P&gt;Not so memory critical &lt;/P&gt;&lt;P&gt;The minus &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Very difficult to program/understand &lt;/P&gt;&lt;P&gt;Mixing processing and reading of data not possible &lt;/P&gt;&lt;P&gt;Use the selection criteria&lt;/P&gt;&lt;P&gt;SELECT * FROM SBOOK. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHECK: SBOOK-CARRID = 'LH' AND &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SBOOK-CONNID = '0400'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDSELECT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM SBOOK &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE CARRID = 'LH' AND &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONNID = '0400'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDSELECT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the aggregated functions&lt;/P&gt;&lt;P&gt;C4A = '000'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM T100 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE SPRSL = 'D' AND &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ARBGB = '00'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHECK: T100-MSGNR &amp;gt; C4A. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C4A = T100-MSGNR. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDSELECT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT MAX( MSGNR ) FROM T100 INTO C4A &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE SPRSL = 'D' AND &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ARBGB = '00'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select with view&lt;/P&gt;&lt;P&gt;SELECT * FROM DD01L &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&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E K = KVAL. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE TAB_DEST. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP&lt;/P&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;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE TAB_DEST WHERE K = KVAL.&lt;/P&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;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tools available in SAP to pin-point a performance problem&lt;/P&gt;&lt;P&gt;· The runtime analysis (SE30)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· SQL Trace (ST05)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· Tips and Tricks tool &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· The performance database&lt;/P&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;&lt;P&gt;Optimizing the load of the database&lt;/P&gt;&lt;P&gt;Using table buffering&lt;/P&gt;&lt;P&gt;Using buffered tables improves the performance considerably. Note that in some cases a statement can not be used with a buffered table, so when using these statements the buffer will be bypassed. These statements are: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select DISTINCT &lt;/P&gt;&lt;P&gt;ORDER BY / GROUP BY / HAVING clause &lt;/P&gt;&lt;P&gt;Any WHERE clause that contains a sub query or IS NULL expression &lt;/P&gt;&lt;P&gt;JOIN s &lt;/P&gt;&lt;P&gt;A SELECT... FOR UPDATE &lt;/P&gt;&lt;P&gt;If you wan t to explicitly bypass the buffer, use the BYPASS BUFFER addition to the SELECT clause. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the ABAP SORT Clause Instead of ORDER BY&lt;/P&gt;&lt;P&gt;The ORDER BY clause is executed on the database server while the ABAP SORT statement is executed on the application server. The database server will usually be the bottleneck, so sometimes it is better to move the sort from the database server to the application server. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are not sorting by the primary key ( E.g. using the ORDER BY PRIMARY key statement) but are sorting by another key, it could be better to use the ABAP SORT statement to sort the data in an internal table. Note however that for very large result sets it might not be a feasible solution and you would want to let the database server sort it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Avoid the SELECT DISTINCT Statement&lt;/P&gt;&lt;P&gt;As with the ORDER BY clause it could be better to avoid using SELECT DISTINCT, if some of the fields are not part of an index. Instead use ABAP SORT + DELETE ADJACENT DUPLICATES on an internal table, to delete duplicate rows. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards&lt;/P&gt;&lt;P&gt;Sreenivasulu P&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Sreenivasulu Ponnadi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jul 2006 10:43:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/1398646#M192871</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-10T10:43:36Z</dc:date>
    </item>
    <item>
      <title>Re: PERFORMANCE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/1398647#M192872</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 can use the following points in improving the performance..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Evaluate requirements &lt;/P&gt;&lt;P&gt;	&lt;/P&gt;&lt;P&gt;Communicate with users to get actual data required so that, default values could be set on Selection Screen.  This would avoid extracting whole lot of data, which may not be really needed.    &lt;/P&gt;&lt;P&gt;	&lt;/P&gt;&lt;P&gt;&amp;#149;Match the requirements. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.	Match the alternative source of information (in less populated tables).  &lt;/P&gt;&lt;P&gt;2.	Instead of Using cluster table, find the alternative transparent tables &lt;/P&gt;&lt;P&gt;3.	Try to match the requirements with the views.&lt;/P&gt;&lt;P&gt;4.	Check if the logical sequence of table access is correct. It is preferable to sequence the database access to go from a table with lesser values to the more populated tables.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;Improve access to Tables&lt;/P&gt;&lt;P&gt;	&lt;/P&gt;&lt;P&gt;1.	As far as possible try to have direct accesses on records by providing full key, so that access would be faster. &lt;/P&gt;&lt;P&gt;2.	Always specify your conditions in the where-clause instead of checking them yourself with check-statements &lt;/P&gt;&lt;P&gt;3.	Whenever possible access the tables through primary keys. Also " select single " can be very helpful. Consider the use of the DISTINCT option in the case of many duplicate entries.&lt;/P&gt;&lt;P&gt;4.	Ensure that you utilise internal tables wherever possible. Avoid doing a large amount of processing within a database select loop.&lt;/P&gt;&lt;P&gt;5.	Similarly nested database selects are an absolute no-no.&lt;/P&gt;&lt;P&gt;	&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;&amp;#149;Reduce Multiple Accesses on databases &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.	Avoid multiple accesses on databases.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.	Use specific fields for transferring data into the internal tables. ( use " into corresponding fields of table " flavour of the select statement ). This is especially true if less than half the available fields have to be transmitted.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.	If internal tables have many  entries, a linear search through all entries is very time-consuming.     Try to keep the table ordered and use binary search ( " Read table " statement with binary search ) .   e.g. consider an internal table itab containing values ( 2,10,4,9,6,12,8,3).&lt;/P&gt;&lt;P&gt;if record with val = 3 is needed the following READ statement is used&lt;/P&gt;&lt;P&gt;READ TABLE ITAB WITH KEY VAL = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The read operation is done sequentially here so the required record is accessed in the 8th step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A better way to do this is :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorting the table using :&lt;/P&gt;&lt;P&gt;SORT ITAB.&lt;/P&gt;&lt;P&gt;READ TABLE ITAB WITH KEY VAL = 3 BINARY SEARCH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorting results in :&lt;/P&gt;&lt;P&gt;itab = ( 2,3,4,6,8,9,10,12 ) &lt;/P&gt;&lt;P&gt;The reqiured record is now read in the 2nd step. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that for best results the itab must hold large number of records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.Avoid doing unnecessary processing within a loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5.A nested database select can be avoided by using the " for all entries " flavour of the select statement. A word of caution - always ensure that the table which is used for further selections (the " for all entries in table " table contains at least one record). A failure to do this check results in all records being picked up by the select. Similarly, avoid identical where clauses for different lines of ITAB by using a sorted internal table in the SELECT &amp;#133; FOR ALL ENTRIES &amp;#133; and using the ABAP language element DELETE ADJACENT DUPLICATES prior to executing the select statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jul 2006 11:24:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/1398647#M192872</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-10T11:24:42Z</dc:date>
    </item>
  </channel>
</rss>

