<?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 on Select Single&amp;Write  AND Select*(For All Entries)&amp;Read&amp;Write in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-on-select-single-write-and-select-for-all-entries-read-write/m-p/7704872#M1578365</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Deleep,&lt;/P&gt;&lt;P&gt;  in my opinion, code 2 is better.&lt;/P&gt;&lt;P&gt;As Neil told, try to use a sorted table or sort your table and then use binary search.&lt;/P&gt;&lt;P&gt;Then look at se30 and see, for case 1 and case 2, the amount of time used for DB selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Feb 2011 08:27:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-02-11T08:27:04Z</dc:date>
    <item>
      <title>Performance on Select Single&amp;Write  AND Select*(For All Entries)&amp;Read&amp;Write</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-on-select-single-write-and-select-for-all-entries-read-write/m-p/7704862#M1578355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got a code review problem &amp;amp; we are in a argument.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need the best performance code out of this two codes. I have tested this both on 5 &amp;amp; 1000 &amp;amp; 3000 &amp;amp; 100,000 &amp;amp; 180,000 records.&lt;/P&gt;&lt;P&gt;But still, I just need a second opinion of experts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES : BEGIN OF ty_account,&lt;/P&gt;&lt;P&gt;        saknr   TYPE   skat-saknr,&lt;/P&gt;&lt;P&gt;        END OF ty_account.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : g_txt50      TYPE skat-txt50.&lt;/P&gt;&lt;P&gt;DATA : g_it_skat    TYPE TABLE OF skat,       g_wa_skat    LIKE LINE OF g_it_skat.&lt;/P&gt;&lt;P&gt;DATA : g_it_account TYPE TABLE OF ty_account, g_wa_account LIKE LINE OF g_it_account.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code 1.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT saknr INTO TABLE g_it_account FROM skat.

LOOP AT g_it_account INTO g_wa_account.
  SELECT SINGLE txt50 INTO g_txt50 FROM skat
    WHERE spras = 'E'
      AND ktopl = 'XXXX'
      AND saknr = g_wa_account-saknr.
  WRITE :/ g_wa_account-saknr, g_txt50.
  CLEAR : g_wa_account, g_txt50.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code 2.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT saknr INTO TABLE g_it_account FROM skat.
SELECT * INTO TABLE g_it_skat FROM skat 
  FOR ALL ENTRIES IN g_it_account
      WHERE spras = 'E'
        AND ktopl = 'XXXX'
        AND saknr = g_it_account-saknr.

LOOP AT g_it_account INTO g_wa_account.
  READ TABLE g_it_skat INTO g_wa_skat WITH KEY saknr = g_wa_account-saknr.
  WRITE :/ g_wa_account-saknr, g_wa_skat-txt50.
  CLEAR : g_wa_account, g_wa_skat.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Dileep .C&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Feb 2011 04:23:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-on-select-single-write-and-select-for-all-entries-read-write/m-p/7704862#M1578355</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-11T04:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: Performance on Select Single&amp;Write  AND Select*(For All Entries)&amp;Read&amp;Write</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-on-select-single-write-and-select-for-all-entries-read-write/m-p/7704863#M1578356</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;As per my knoweldge second code is better option. You need to validate the internal table g_it_account  before select for all entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT saknr INTO TABLE g_it_account FROM skat.
IF  g_it_account[] is not initial.  "This is mandatory for select all entries
SELECT * INTO TABLE g_it_skat FROM skat 
  FOR ALL ENTRIES IN g_it_account
      WHERE spras = 'E'
        AND ktopl = 'XXXX'
        AND saknr = g_it_account-saknr.
ENDIF.   
 
LOOP AT g_it_account INTO g_wa_account.
  READ TABLE g_it_skat INTO g_wa_skat WITH KEY saknr = g_wa_account-saknr.
  WRITE :/ g_wa_account-saknr, g_wa_skat-txt50.
  CLEAR : g_wa_account, g_wa_skat.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chandra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Feb 2011 04:32:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-on-select-single-write-and-select-for-all-entries-read-write/m-p/7704863#M1578356</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-11T04:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: Performance on Select Single&amp;Write  AND Select*(For All Entries)&amp;Read&amp;Write</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-on-select-single-write-and-select-for-all-entries-read-write/m-p/7704864#M1578357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chandra,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nice to see reply from you, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try like this, create two programs, ZTEST1, ZTEST2, Copy the two codes in two programs, &lt;/P&gt;&lt;P&gt;&amp;amp; check results as I mentioned for the Database records, up to 10 rows, 3000 rows, 100K rows, &amp;amp; Select all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When we execute, I noticed a huge diff in time.&lt;/P&gt;&lt;P&gt;I observed, Select Single is 60-80% Faster than For All Entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need this SE30 Confirmation from you people.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, &lt;/P&gt;&lt;P&gt;Dileep .C&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Feb 2011 04:35:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-on-select-single-write-and-select-for-all-entries-read-write/m-p/7704864#M1578357</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-11T04:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: Performance on Select Single&amp;Write  AND Select*(For All Entries)&amp;Read&amp;Write</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-on-select-single-write-and-select-for-all-entries-read-write/m-p/7704865#M1578358</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;&lt;/P&gt;&lt;P&gt;1. It is not advisable to use SELECT in loop.&lt;/P&gt;&lt;P&gt;2. Before using FOR ALL ENTRIES you must always check the internal table against which you are checking.&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    SELECT saknr INTO TABLE g_it_account FROM skat.
    If g_it_account IS NOT INITIAL.
        SELECT * INTO TABLE g_it_skat FROM skat 
        FOR ALL ENTRIES IN g_it_account
        WHERE spras = 'E'
        AND ktopl = 'XXXX'
        AND saknr = g_it_account-saknr.
   ENDIF.
   LOOP AT g_it_account INTO g_wa_account.
       READ TABLE g_it_skat INTO g_wa_skat WITH KEY saknr = g_wa_account-saknr.
       WRITE :/ g_wa_account-saknr, g_wa_skat-txt50.
      CLEAR : g_wa_account, g_wa_skat.
  ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think code 2 is a better performance code.&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;Shraddha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Feb 2011 04:39:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-on-select-single-write-and-select-for-all-entries-read-write/m-p/7704865#M1578358</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-11T04:39:16Z</dc:date>
    </item>
    <item>
      <title>Re: Performance on Select Single&amp;Write  AND Select*(For All Entries)&amp;Read&amp;Write</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-on-select-single-write-and-select-for-all-entries-read-write/m-p/7704866#M1578359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;but both selects target the same table! Why can't you just code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * INTO TABLE g_it_skat FROM skat &lt;/P&gt;&lt;P&gt;      WHERE spras = 'E'&lt;/P&gt;&lt;P&gt;        AND ktopl = 'XXXX'.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;*sort table&lt;/P&gt;&lt;P&gt; sort gt_it_skat by saknr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT g_it_account INTO g_wa_account.&lt;/P&gt;&lt;P&gt;  READ TABLE g_it_skat INTO g_wa_skat WITH KEY saknr = g_wa_account-saknr binary search.&lt;/P&gt;&lt;P&gt;  WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; g_wa_account-saknr, g_wa_skat-txt50.&lt;/P&gt;&lt;P&gt;  CLEAR : g_wa_account, g_wa_skat.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Feb 2011 04:51:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-on-select-single-write-and-select-for-all-entries-read-write/m-p/7704866#M1578359</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2011-02-11T04:51:42Z</dc:date>
    </item>
    <item>
      <title>Re: Performance on Select Single&amp;Write  AND Select*(For All Entries)&amp;Read&amp;Write</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-on-select-single-write-and-select-for-all-entries-read-write/m-p/7704867#M1578360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dilip.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from you both the code I have found that you are selecting 2 diffrent fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Code 1.&lt;/P&gt;&lt;P&gt;you are selecting SAKNR and then for these SAKNR you are selecting TXT50 from the same table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in Code 2 you are selecting all the fields from SAKT table for all the values of SAKNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know whats your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Better you declare a select option on screen and then fetch required fields from SAKT table for the values entered on screen for SAKNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you only need TXT50 and SAKNR fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so declare two types one for SAKNR and another for TXT50.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Points to be remember.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; 1. while using for all entries always check the for all entries table should not be blank.&lt;/P&gt;&lt;P&gt; 2. you will have to fetch all the key fields in table while applying for all entries,&lt;/P&gt;&lt;P&gt;    you can compare key fields with a constant which is greater than initial value.&lt;/P&gt;&lt;P&gt; 3. while reading the table sort the table by the field on which you are going to read it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES : BEGIN OF ty_account,&lt;/P&gt;&lt;P&gt;saknr TYPE skat-saknr,&lt;/P&gt;&lt;P&gt;END OF ty_account.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES : begin of T_txt50,&lt;/P&gt;&lt;P&gt;      saknr type saknr,&lt;/P&gt;&lt;P&gt;      txt50 type txt50,&lt;/P&gt;&lt;P&gt;end of t_txt50.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: i_account type table of t_account,&lt;/P&gt;&lt;P&gt;      w_account type t_account,&lt;/P&gt;&lt;P&gt;      i_txt50 type table t_txt50,&lt;/P&gt;&lt;P&gt;      w_txt50 type t_txt50.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select SAKNR from SKAT into table i_account.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;sort i_account by saknr.&lt;/P&gt;&lt;P&gt;select saknr txt50 from SKAT into table i_txt50&lt;/P&gt;&lt;P&gt;for all entries in i_account&lt;/P&gt;&lt;P&gt;where SAKNR = i_account-SAKNR&lt;/P&gt;&lt;P&gt;here mention al the primary keys and compare them with their constants.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note; here you need to take care that, you will have to fetch all the key fields in table i_txt50.&lt;/P&gt;&lt;P&gt;and compare those fields with there constants which should be greater than initial values.&lt;/P&gt;&lt;P&gt;they should be in proper sequence.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now for writing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at i_account into w_account.&lt;/P&gt;&lt;P&gt;clear w_txt50.&lt;/P&gt;&lt;P&gt;sort i_txt50 by saknr.&lt;/P&gt;&lt;P&gt;read table i_txt50 into w_txt50 with key SAKNR = w_account-saknr&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;write: w_txt50-saknr, w-txt50-txt50.&lt;/P&gt;&lt;P&gt;clear w_txt50, w_account.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it wil clear your doubts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Lalit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Feb 2011 04:55:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-on-select-single-write-and-select-for-all-entries-read-write/m-p/7704867#M1578360</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-11T04:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: Performance on Select Single&amp;Write  AND Select*(For All Entries)&amp;Read&amp;Write</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-on-select-single-write-and-select-for-all-entries-read-write/m-p/7704868#M1578361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Neil &amp;amp; Lalit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its going off topic,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just changed here select from same table,&lt;/P&gt;&lt;P&gt;Actually In my real scenario, Both are diff tables (Say, RACCT &amp;amp; SAKNR).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I just need a very straight answer, Code1 or Code2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Points of Interest, &lt;/P&gt;&lt;P&gt;Code 1 : Every one Says, Select inside Loop is not suggestable, But my output time is  2 Secs Appx Against 180K Records.&lt;/P&gt;&lt;P&gt;Code 2 : Every one Says, Its best performance, But My Code takes 10 Secs Appx against 180K Records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So Do you people Suggest to go for best performance &amp;amp; do it for 10 secs, &amp;amp; what about when the Records in DB table reaches around some 500K records, &amp;amp; time would be 1-2 mins to see my output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please throw some of your expert opinions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Dileep .C&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Feb 2011 05:34:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-on-select-single-write-and-select-for-all-entries-read-write/m-p/7704868#M1578361</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-11T05:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: Performance on Select Single&amp;Write  AND Select*(For All Entries)&amp;Read&amp;Write</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-on-select-single-write-and-select-for-all-entries-read-write/m-p/7704869#M1578362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dileep,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I  will go for with  first option. I don't think select single inside a loop slow down the performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Feb 2011 05:38:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-on-select-single-write-and-select-for-all-entries-read-write/m-p/7704869#M1578362</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2011-02-11T05:38:10Z</dc:date>
    </item>
    <item>
      <title>Re: Performance on Select Single&amp;Write  AND Select*(For All Entries)&amp;Read&amp;Write</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-on-select-single-write-and-select-for-all-entries-read-write/m-p/7704870#M1578363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in that case go for option 2 but ensure that your internal table is either defined as sorted...or is actualy sorted and read with the binary search clause....that should make sure perf is better&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Feb 2011 05:48:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-on-select-single-write-and-select-for-all-entries-read-write/m-p/7704870#M1578363</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2011-02-11T05:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: Performance on Select Single&amp;Write  AND Select*(For All Entries)&amp;Read&amp;Write</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-on-select-single-write-and-select-for-all-entries-read-write/m-p/7704871#M1578364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Neil,&lt;/P&gt;&lt;P&gt;But option 2 is taking huge time, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its Multiplying the time. &lt;/P&gt;&lt;P&gt;At last whats the point saying its best performance when its directly increasing the time which a human eye can see.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Option 1 = 2   secs.&lt;/P&gt;&lt;P&gt;Option 2 = 10 secs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, &lt;/P&gt;&lt;P&gt;Dileep .C&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Feb 2011 06:00:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-on-select-single-write-and-select-for-all-entries-read-write/m-p/7704871#M1578364</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-11T06:00:53Z</dc:date>
    </item>
    <item>
      <title>Re: Performance on Select Single&amp;Write  AND Select*(For All Entries)&amp;Read&amp;Write</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-on-select-single-write-and-select-for-all-entries-read-write/m-p/7704872#M1578365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Deleep,&lt;/P&gt;&lt;P&gt;  in my opinion, code 2 is better.&lt;/P&gt;&lt;P&gt;As Neil told, try to use a sorted table or sort your table and then use binary search.&lt;/P&gt;&lt;P&gt;Then look at se30 and see, for case 1 and case 2, the amount of time used for DB selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Feb 2011 08:27:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-on-select-single-write-and-select-for-all-entries-read-write/m-p/7704872#M1578365</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-11T08:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: Performance on Select Single&amp;Write  AND Select*(For All Entries)&amp;Read&amp;Write</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-on-select-single-write-and-select-for-all-entries-read-write/m-p/7704873#M1578366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You've already proven that code 1 is much faster, so why the doubt?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And given your code example: i don't see a reason why SELECT SINGLE in a loop would cause any performance problems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just go for code 1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Feb 2011 08:52:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-on-select-single-write-and-select-for-all-entries-read-write/m-p/7704873#M1578366</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-11T08:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: Performance on Select Single&amp;Write  AND Select*(For All Entries)&amp;Read&amp;Write</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-on-select-single-write-and-select-for-all-entries-read-write/m-p/7704874#M1578367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes Exactly,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its already Proven in my system, that there was a huge diff in Code 1 &amp;amp; Code 2.&lt;/P&gt;&lt;P&gt;I just wanted to check if my system is wrong or it is same in other system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead I got a whole lot of Diff Opinions, Anyways thanks for all the Suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Dileep .C&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Feb 2011 08:56:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-on-select-single-write-and-select-for-all-entries-read-write/m-p/7704874#M1578367</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-11T08:56:27Z</dc:date>
    </item>
    <item>
      <title>Re: Performance on Select Single&amp;Write  AND Select*(For All Entries)&amp;Read&amp;Write</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-on-select-single-write-and-select-for-all-entries-read-write/m-p/7704875#M1578368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Nothing is proven if you replace one bug by another !&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The FAE is of course faster than the SELECT inside a LOOP, there is no doubt about that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you end up with 2 internal tables, so you must manage the nested loop!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is simple with a sorted table, hashed table or standard table with BINARY SEARCH (one of the absolute topsellers in this forum).&lt;/P&gt;&lt;P&gt;The quadratic scaling of your solution will kill the performance of option 2, for large tables even more than option 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Siegfried&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Feb 2011 16:49:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-on-select-single-write-and-select-for-all-entries-read-write/m-p/7704875#M1578368</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-11T16:49:07Z</dc:date>
    </item>
  </channel>
</rss>

