<?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: which statement is faster? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-statement-is-faster/m-p/6691102#M1451129</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;if you eager to increase performance and possible troubles with capacity don't disturb you you can create index for a field you want to search by. But for date it's not the best solution to keep in index 65 million different dates. But this can be better than several hours of waiting the result &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;And I thought of one crazy idea. Probably you can in some way control the data (BADI or other enhancements) which is added to this table. Create Z* table with single date-field which will keep the latest one according to your purposes. Selecting this value will be definitely faster &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Drabkov Anton on Mar 4, 2010 4:08 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Drabkov Anton on Mar 4, 2010 4:11 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Mar 2010 15:07:36 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-03-04T15:07:36Z</dc:date>
    <item>
      <title>which statement is faster?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-statement-is-faster/m-p/6691086#M1451113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My table have estimated 2.8 million of records with blank SERNR (serial number).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Every SERNR has a SCAN_DATE with them. I just want the latest date from the 2.8mil records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which statement is faster?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT scan_date&lt;/P&gt;&lt;P&gt;  INTO TABLE temp&lt;/P&gt;&lt;P&gt;  WHERE sernr = ' '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT temp BY sernr ASCENDING scan_date DESCENDING.&lt;/P&gt;&lt;P&gt;DELETE ADJACENT temp COMPARING sernr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT MAX( scan_date )&lt;/P&gt;&lt;P&gt;INTO TABLE temp&lt;/P&gt;&lt;P&gt;WHERE sernr = ' '&lt;/P&gt;&lt;P&gt;GROUP BY scan_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or is there any better way?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: siew lead choon on Mar 1, 2010 6:00 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Mar 2010 17:00:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-statement-is-faster/m-p/6691086#M1451113</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-01T17:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: which statement is faster?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-statement-is-faster/m-p/6691087#M1451114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Execute this and check&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: start  TYPE i,
      end    TYPE i,
      dif    TYPE i,
      avg    TYPE i.
CLEAR avg.
DO 5 TIMES.


DO 5 TIMES.
  GET RUN TIME FIELD start.
  SELECT scan_date
  INTO TABLE temp
  WHERE sernr = ' '.

  SORT temp BY sernr ASCENDING scan_date DESCENDING.
  DELETE ADJACENT temp COMPARING sernr.
  GET RUN TIME FIELD end.
  dif = end - start.
  WRITE: /001 'Time for NE     ', dif, 'microseconds'.
  avg = avg + dif.
ENDDO.
avg = avg / 5.
WRITE: /001 'Average         ', avg, 'microseconds'.
SKIP 1.
 
CLEAR avg.
DO 5 TIMES.
GET RUN TIME FIELD start.
SELECT MAX( scan_date )
INTO TABLE temp
WHERE sernr = ' '
GROUP BY scan_date.
 GET RUN TIME FIELD end.
  dif = end - start.
  WRITE: /001 'Time for EQ     ', dif, 'microseconds'.
  avg = avg + dif.
ENDDO.
avg = avg / 5.
WRITE: /001 'Average         ', avg, 'microseconds'.
SKIP 1.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Mar 2010 18:42:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-statement-is-faster/m-p/6691087#M1451114</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-03-01T18:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: which statement is faster?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-statement-is-faster/m-p/6691088#M1451115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One more option you have is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT   scan_date
INTO     l_scan_date
FROM     table_name
UP TO 1 ROWS
WHERE    sernr = ' '
ORDER BY scan_date DESCENDING.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Mar 2010 19:38:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-statement-is-faster/m-p/6691088#M1451115</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-01T19:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: which statement is faster?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-statement-is-faster/m-p/6691089#M1451116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the max is of course the fastest!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And there is something wrong with the sernr, if is initial, so there is only one value, GROUP BY is useless and &lt;/P&gt;&lt;P&gt;DELETE adjacent duplicates is also useless.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only alternative is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT

if ( ...data &amp;gt; max_date ).
  max_date = ...
endif.

ENDSELECT.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This can be o.k., if there are not so many hits.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ORDER BY and UP TO 1 ROWS is also slower, because it must find all hit, sort them and then it takes the largest.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Mar 2010 09:20:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-statement-is-faster/m-p/6691089#M1451116</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-02T09:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: which statement is faster?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-statement-is-faster/m-p/6691090#M1451117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi keshav and sudhi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried all the 3 methods but since the table has est 2.8 million records with blank sernr, each methods still takes very long till the server time out on most case. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hi Siegfried,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you explain more on your alternative way?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks all for the suggestion anyway.:)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Mar 2010 10:45:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-statement-is-faster/m-p/6691090#M1451117</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-02T10:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: which statement is faster?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-statement-is-faster/m-p/6691091#M1451118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt;I have tried all the 3 methods but since the table has est 2.8 million records with blank sernr, each methods still takes very long &amp;gt; till the server time out on most case. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what is very long??? with 2.8 srrnr = '' is will always take long, how many records are in the whole table, because it is a full table scan and there is no way to avoid it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And your first option should actually never work with 2.8 mio records, it will take years, but I guess it dumps first.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Mar 2010 12:34:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-statement-is-faster/m-p/6691091#M1451118</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-02T12:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: which statement is faster?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-statement-is-faster/m-p/6691092#M1451119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you try this yet?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT MAX( scan_date )
INTO   l_scan_date
FROM   table_name
WHERE  sernr = ''.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Mar 2010 16:06:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-statement-is-faster/m-p/6691092#M1451119</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-02T16:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: which statement is faster?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-statement-is-faster/m-p/6691093#M1451120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yup, i tried that...its also very slow...&lt;/P&gt;&lt;P&gt;its very slow only when the sernr is ' ' as there are too many blank sernr...and i am not supplied enough WHERE fields to select more precise data...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Mar 2010 16:34:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-statement-is-faster/m-p/6691093#M1451120</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-02T16:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: which statement is faster?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-statement-is-faster/m-p/6691094#M1451121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try selecting without the sernr something like :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: begin of t_temp occurs 0,
           sernr,
          scan_date,
       end of t_temp.

select sernr scan_date into table t_temp from table where &amp;lt;keyfields&amp;gt;.

sort t_temp by sernr ascending scan_data descending.

read table t_temp index 1.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the sort you should have the max date for the blank sernr in the first record.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Mar 2010 16:50:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-statement-is-faster/m-p/6691094#M1451121</guid>
      <dc:creator>PedroGuarita</dc:creator>
      <dc:date>2010-03-02T16:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: which statement is faster?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-statement-is-faster/m-p/6691095#M1451122</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;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; its very slow only when the sernr is ' ' as there are too many blank sernr...and i am not supplied enough WHERE fields to select more precise data...&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please post table and index definition and the execution plan from ST05... .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hermann&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Mar 2010 20:11:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-statement-is-faster/m-p/6691095#M1451122</guid>
      <dc:creator>HermannGahm</dc:creator>
      <dc:date>2010-03-02T20:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: which statement is faster?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-statement-is-faster/m-p/6691096#M1451123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt;but since the table has est 2.8 million records with blank sernr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the 2.8 million are the records with blank sernr or the total of the table.&lt;/P&gt;&lt;P&gt;In the first case there is nearly no chance that it is no full table scan, i.e. it must be slow!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then comes the hard question, is this really a problem? I have some doubts, that this task is very reasonable and will be repeated very often.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Siegfried&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Mar 2010 11:38:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-statement-is-faster/m-p/6691096#M1451123</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-03T11:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: which statement is faster?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-statement-is-faster/m-p/6691097#M1451124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;there are 2.8mil records with blank sernr...total records are about 65 million...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Mar 2010 13:29:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-statement-is-faster/m-p/6691097#M1451124</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-03T13:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: which statement is faster?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-statement-is-faster/m-p/6691098#M1451125</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;please post more details from ST05. Execution plan, indexes available, ... .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hermann&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Mar 2010 13:36:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-statement-is-faster/m-p/6691098#M1451125</guid>
      <dc:creator>HermannGahm</dc:creator>
      <dc:date>2010-03-03T13:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: which statement is faster?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-statement-is-faster/m-p/6691099#M1451126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; there are 2.8mil records with blank sernr...total records are about 65 million...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;o.k., that is what I expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So what is the runtime and what do you expect?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Mar 2010 15:45:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-statement-is-faster/m-p/6691099#M1451126</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-03T15:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: which statement is faster?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-statement-is-faster/m-p/6691100#M1451127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;jz want to know which statement is the fastest since testing all would take hours...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my table is a custom table and has 3 own indexes...there are many other fields but i just simplify it here...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks all for help...:)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Mar 2010 16:47:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-statement-is-faster/m-p/6691100#M1451127</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-03T16:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: which statement is faster?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-statement-is-faster/m-p/6691101#M1451128</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;Albert Einstein said:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Everything should be made as simple as possible, but not simpler.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; my table is a custom table and has 3 own indexes...there are many other fields but i just simplify it here...&lt;/P&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order to help you we need more information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How long does your query run and what is your expectation?&lt;/P&gt;&lt;P&gt;What execution plan is currently used?&lt;/P&gt;&lt;P&gt;How do your indexes look like?&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hermann&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Mar 2010 17:20:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-statement-is-faster/m-p/6691101#M1451128</guid>
      <dc:creator>HermannGahm</dc:creator>
      <dc:date>2010-03-03T17:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: which statement is faster?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-statement-is-faster/m-p/6691102#M1451129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;if you eager to increase performance and possible troubles with capacity don't disturb you you can create index for a field you want to search by. But for date it's not the best solution to keep in index 65 million different dates. But this can be better than several hours of waiting the result &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;And I thought of one crazy idea. Probably you can in some way control the data (BADI or other enhancements) which is added to this table. Create Z* table with single date-field which will keep the latest one according to your purposes. Selecting this value will be definitely faster &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Drabkov Anton on Mar 4, 2010 4:08 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Drabkov Anton on Mar 4, 2010 4:11 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Mar 2010 15:07:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-statement-is-faster/m-p/6691102#M1451129</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-04T15:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: which statement is faster?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-statement-is-faster/m-p/6691103#M1451130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;nonsense, you don't have to wait for hours !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just add another WHERE condition and you can compare on a much smaller basis of data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But as I told you already the second is faster.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But your large task will always be slow, 2 is slow and 1 is slower.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clear !?!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Mar 2010 15:39:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-statement-is-faster/m-p/6691103#M1451130</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-04T15:39:19Z</dc:date>
    </item>
  </channel>
</rss>

