<?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 Performance in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/2954619#M696910</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;What is better:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT docnum&lt;/P&gt;&lt;P&gt;FROM edids&lt;/P&gt;&lt;P&gt;INTO TABLE i_edids &lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN it_workitem&lt;/P&gt;&lt;P&gt;WHERE stapa1 = it_wotktiem-id AND&lt;/P&gt;&lt;P&gt;             status NE '68'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;With an index for stapa1 and status.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT docnum&lt;/P&gt;&lt;P&gt;FROM edids&lt;/P&gt;&lt;P&gt;INTO TABLE i_edids &lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN it_workitem&lt;/P&gt;&lt;P&gt;WHERE stapa1 = it_wotktiem-id.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE i_edidds WHERE status = '68'. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;With an index for stapa1.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pd: edids has around 65M of entries.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Oct 2007 11:34:09 GMT</pubDate>
    <dc:creator>former_member582701</dc:creator>
    <dc:date>2007-10-16T11:34:09Z</dc:date>
    <item>
      <title>Performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/2954619#M696910</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;What is better:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT docnum&lt;/P&gt;&lt;P&gt;FROM edids&lt;/P&gt;&lt;P&gt;INTO TABLE i_edids &lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN it_workitem&lt;/P&gt;&lt;P&gt;WHERE stapa1 = it_wotktiem-id AND&lt;/P&gt;&lt;P&gt;             status NE '68'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;With an index for stapa1 and status.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT docnum&lt;/P&gt;&lt;P&gt;FROM edids&lt;/P&gt;&lt;P&gt;INTO TABLE i_edids &lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN it_workitem&lt;/P&gt;&lt;P&gt;WHERE stapa1 = it_wotktiem-id.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE i_edidds WHERE status = '68'. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;With an index for stapa1.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pd: edids has around 65M of entries.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 11:34:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/2954619#M696910</guid>
      <dc:creator>former_member582701</dc:creator>
      <dc:date>2007-10-16T11:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: Performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/2954620#M696911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SELECT docnum&lt;/P&gt;&lt;P&gt;FROM edids&lt;/P&gt;&lt;P&gt;INTO TABLE i_edids &lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN it_workitem&lt;/P&gt;&lt;P&gt;WHERE stapa1 = it_wotktiem-id AND&lt;/P&gt;&lt;P&gt;status NE '68'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is better which you can check in SE30 also&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	In a SELECT statement, only the fields (field-list) which are needed are selected in the order that they reside on the database, thus network load is considerably less. The number of fields can be restricted in two ways using a field list in the SELECT clause of the statement or by using a view defined in ABAP/4 Dictionary.  The usage of view has the advantage of better reusability.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	SELECT SINGLE is used instead of SELECT-ENDSELECT loop when the entire key is available. SELECT SINGLE requires one communication with the database system, whereas SELECT-ENDSELECT needs two.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	Always specify the conditions in the WHERE-clause instead of checking them with check-statements, the database system can then use an index (if possible) and the network load is considerably less.  You should not check the conditions with the CHECK statement because the contents of the whole table must be read from the database files into DBMS cache and transferred over the network. If the conditions are specified in the where clause DBMS reads exactly the needed data&lt;/P&gt;&lt;P&gt;&amp;#149;	Complex code is not embedded within a SELECT / ENDSELECT statement.&lt;/P&gt;&lt;P&gt;&amp;#149;	No complex WHERE clauses, since complex where clauses are poison for the statement optimizer in any database system.&lt;/P&gt;&lt;P&gt;&amp;#149;	For all frequently used SELECT statements, try to use an index. You always use an index if you specify (a generic part of) the index fields concatenated with logical ANDs in the Select statement's WHERE clause&lt;/P&gt;&lt;P&gt;&amp;#149;	When loading data into Internal table, INTO TABLE OR APPENDING TABLE is used instead of a SELECT/APPEND combination. It is always faster to use the INTO TABLE version of a Select statement than to use APPEND statements&lt;/P&gt;&lt;P&gt;&amp;#149;	Use a select list with aggregate functions instead of checking and computing, when trying to find the maximum, minimum, sum and average value or the count of a database column.&lt;/P&gt;&lt;P&gt;&amp;#149;	VIEW or JOIN is used to replace nested SELECT statements. This decreases the network load caused by database selects.  If a nested SELECT is used, the inner select statement is executed several times which might cause unnecessary overhead.&lt;/P&gt;&lt;P&gt;&amp;#149;	Use SAP buffering for accessing frequently used, read-only tables, network load can be considerably less. However, in case of retrieving latest data in multi-user environment, you may need to bypass the buffer&lt;/P&gt;&lt;P&gt;&amp;#149;	Whenever possible, use array operations instead of single-row operations to modify your database tables. The frequent communication between the application program and database system produces considerable overhead.&lt;/P&gt;&lt;P&gt;&amp;#149;	EXIT is used within SELECT / ENDSELECT if the entire key is not available and you only want to retrieve the first matching record.&lt;/P&gt;&lt;P&gt;&amp;#149;	ORDER BY statement is used in SELECT only if it can use an index, otherwise, sorting is more effective.  Read into an internal table and use the SORT statement in the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Minal Nampalliwar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 11:35:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/2954620#M696911</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-16T11:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: Performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/2954621#M696912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The below statement is better performance:&lt;/P&gt;&lt;P&gt;SELECT docnum&lt;/P&gt;&lt;P&gt;FROM edids&lt;/P&gt;&lt;P&gt;INTO TABLE i_edids &lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN it_workitem&lt;/P&gt;&lt;P&gt;WHERE stapa1 = it_wotktiem-id AND&lt;/P&gt;&lt;P&gt;status NE '68'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check Se30 as well as ST05&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please give me reward points....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 11:37:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/2954621#M696912</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-16T11:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: Performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/2954622#M696913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the first query is better, as during retrieval of data itself we r mentioning the condition status NE '68'. So the records which satisfy the condition are retrived hereitself. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in the second case, after retrieval we are deleting. So time consumption may be there.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 11:38:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/2954622#M696913</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-16T11:38:48Z</dc:date>
    </item>
    <item>
      <title>Re: Performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/2954623#M696914</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;It will better to use the first one since in a single statment all relevant records has been fetched whereas in the second one has two statment which onces again goes through the selected record for deleting for the condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Muthu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 11:39:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/2954623#M696914</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-16T11:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: Performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/2954624#M696915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmmm....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the delete is from an internal table. The max consumption is always the select statement. My doubt has appears because we are using the NE comparation. If it would be EQ i have no doubt that first is better, but with NE i am not sure that we exploit the index&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 12:08:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/2954624#M696915</guid>
      <dc:creator>former_member582701</dc:creator>
      <dc:date>2007-10-16T12:08:04Z</dc:date>
    </item>
  </channel>
</rss>

