<?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 Query Takes more time in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435531#M1411557</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U r right and i propossed same solution to business.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had tested several cases.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Test 1: When I ran for retrieving 60 Days data it took 2 Hrs 27mins to complete job in background. No. od records here is 4 Lacks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Test2 : When I ran for retrieving for 8 Days data it took 2Hrs 40 Mins to complete job in background. No.of records heres is 1 lack.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why is this difference.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Dec 2009 10:57:07 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-12-09T10:57:07Z</dc:date>
    <item>
      <title>Select Query Takes more time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435521#M1411547</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;I have cloned KSB1 tcode to custom one as required by business.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below query takes more time than excepted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here V_DB_TABLE = COVP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Values in Where clause are as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OBNJR in ( KSBB010000001224  BT  KSBB012157221571)&lt;/P&gt;&lt;P&gt;GJAHR in blank&lt;/P&gt;&lt;P&gt;VERSN in '000'&lt;/P&gt;&lt;P&gt;WRTTP in '04' and '11'&lt;/P&gt;&lt;P&gt;all others are blank&lt;/P&gt;&lt;P&gt;VT_VAR_COND = ( CPUDT BETWEEN '20091201' and '20091208' )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SELECT (VT_FIELDS) INTO CORRESPONDING FIELDS OF GS_COVP_EXT       &lt;/P&gt;&lt;P&gt;                    FROM (V_DB_TABLE)                              &lt;/P&gt;&lt;P&gt;                    WHERE LEDNR = '00'                             &lt;/P&gt;&lt;P&gt;                    AND   OBJNR IN LR_OBJNR                        &lt;/P&gt;&lt;P&gt;                    AND   GJAHR IN GR_GJAHR                        &lt;/P&gt;&lt;P&gt;                    AND   VERSN IN GR_VERSN                        &lt;/P&gt;&lt;P&gt;                    AND   WRTTP IN GR_WRTTP                        &lt;/P&gt;&lt;P&gt;                    AND   KSTAR IN LR_KSTAR                        &lt;/P&gt;&lt;P&gt;                    AND   PERIO IN GR_PERIO                        &lt;/P&gt;&lt;P&gt;                    AND   BUDAT IN GR_BUDAT                        &lt;/P&gt;&lt;P&gt;                    AND   PAROB IN GR_PAROB                        &lt;/P&gt;&lt;P&gt;                    AND   (VT_VAR_COND).     &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Checked in table for this condition it has only 92 entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when i execute program takes long time as 3 Hrs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could any one help me on this&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2009 08:46:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435521#M1411547</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-08T08:46:33Z</dc:date>
    </item>
    <item>
      <title>Re: Select Query Takes more time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435522#M1411548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Select Query has form as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT (VT_FIELDS) INTO CORRESPONDING FIELDS OF GS_COVP_EXT &lt;/P&gt;&lt;P&gt;FROM (V_DB_TABLE) &lt;/P&gt;&lt;P&gt;WHERE LEDNR = '00' &lt;/P&gt;&lt;P&gt;AND OBJNR IN LR_OBJNR &lt;/P&gt;&lt;P&gt;AND GJAHR IN GR_GJAHR &lt;/P&gt;&lt;P&gt;AND VERSN IN GR_VERSN &lt;/P&gt;&lt;P&gt;AND WRTTP IN GR_WRTTP &lt;/P&gt;&lt;P&gt;AND KSTAR IN LR_KSTAR &lt;/P&gt;&lt;P&gt;AND PERIO IN GR_PERIO &lt;/P&gt;&lt;P&gt;AND BUDAT IN GR_BUDAT &lt;/P&gt;&lt;P&gt;AND PAROB IN GR_PAROB &lt;/P&gt;&lt;P&gt;AND (VT_VAR_COND). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="4" type="ul"&gt;&lt;P&gt;Some Processing like moving to internal table &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2009 08:49:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435522#M1411548</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-08T08:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: Select Query Takes more time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435523#M1411549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Praveen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to build the SELECT query with out into Corresponding Fields..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Into Corresponding Fields in one of time consuming statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Siva.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2009 10:18:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435523#M1411549</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-08T10:18:25Z</dc:date>
    </item>
    <item>
      <title>Re: Select Query Takes more time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435524#M1411550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to view values in COVP using SE16, passing entries what i have passed to select query. Here also it takes more time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2009 10:22:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435524#M1411550</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-08T10:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: Select Query Takes more time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435525#M1411551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Pls check this ...&lt;/P&gt;&lt;P&gt;&lt;DEL&gt;1.Dont use SELECT/ENDSELECT instead use  INTO TABLE addition&lt;/DEL&gt;&lt;/P&gt;&lt;P&gt;&lt;DEL&gt;2.Avoid using corresponding addition.create a type and reference it.&lt;/DEL&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the select is going for dump beacause of storage limitations ,then use Cursors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: A J Raj on Dec 11, 2009 3:07 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2009 11:52:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435525#M1411551</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-08T11:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: Select Query Takes more time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435526#M1411552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What does ST05 show? Which index is being used? Did you see &lt;SPAN __jive_macro_name="thread" id="1283414"&gt;&lt;/SPAN&gt; ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2009 14:13:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435526#M1411552</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-08T14:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: Select Query Takes more time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435527#M1411553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt;1.Dont use SELECT/ENDSELECT instead use INTO TABLE addition .&lt;/P&gt;&lt;P&gt;&amp;gt; 2.Avoid using corresponding addition.create a type and reference it.&lt;/P&gt;&lt;P&gt;&amp;gt; If the select is going for dump beacause of storage limitations ,then use Cursors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you got three large NOs .... all three recommendations are wrong!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The SE16 test is going in the right direction ... but what was filled. Nobody knows!!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select options:&lt;/P&gt;&lt;P&gt;Did you ever try to trace the SE16?  The generic statement has for every field an in-condition!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Without the information what was actually filled, nobody can say something there&lt;/P&gt;&lt;P&gt;are at least 2**n  combinations possible!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use ST05 for SE16 and check actual statement plus explain!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2009 20:10:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435527#M1411553</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-08T20:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: Select Query Takes more time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435528#M1411554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, actually, he does give some:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;OBNJR in ( KSBB010000001224 BT KSBB012157221571)&lt;/P&gt;&lt;P&gt;&amp;gt;GJAHR in blank&lt;/P&gt;&lt;P&gt;&amp;gt;VERSN in '000'&lt;/P&gt;&lt;P&gt;&amp;gt;WRTTP in '04' and '11'&lt;/P&gt;&lt;P&gt;&amp;gt;all others are blank&lt;/P&gt;&lt;P&gt;&amp;gt;VT_VAR_COND = ( CPUDT BETWEEN '20091201' and '20091208' )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the problem is in the first one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2009 20:50:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435528#M1411554</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-08T20:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: Select Query Takes more time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435529#M1411555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Praveen,&lt;/P&gt;&lt;P&gt;                 I think your approach to fetch the data is wrong.You are using a view COVP to get the data which is join of COBK and COEP. And for fetching the data you are not providing the key also.So system is taking all the time in the world to get this data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just check if it is possible for you to get the value of key fields.If not,then change the approach.First select data from COEP.You have objnr and it is there in secondary index.After fetching this get data from COBK by FOR ALL ENTRIES IN.I think that will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Dec 2009 05:06:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435529#M1411555</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-09T05:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: Select Query Takes more time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435530#M1411556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rob, you are right ... in a not so optimal writing. I saw only the INs &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Dec 2009 09:27:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435530#M1411556</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-09T09:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: Select Query Takes more time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435531#M1411557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U r right and i propossed same solution to business.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had tested several cases.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Test 1: When I ran for retrieving 60 Days data it took 2 Hrs 27mins to complete job in background. No. od records here is 4 Lacks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Test2 : When I ran for retrieving for 8 Days data it took 2Hrs 40 Mins to complete job in background. No.of records heres is 1 lack.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why is this difference.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Dec 2009 10:57:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435531#M1411557</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-09T10:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: Select Query Takes more time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435532#M1411558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I looked in my system at COEP (one of the tables included in the COVP view). There is an index provided by SAP on these fields (in this order):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OBJNR&lt;/P&gt;&lt;P&gt;KSTAR&lt;/P&gt;&lt;P&gt;GJAHR&lt;/P&gt;&lt;P&gt;PERIO&lt;/P&gt;&lt;P&gt;PAROB1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should probably use this index by rearranging your where clause to this. Does it help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE OBJNR IN LR_OBJNR &lt;/P&gt;&lt;P&gt;AND KSTAR IN LR_KSTAR &lt;/P&gt;&lt;P&gt;AND GJAHR IN GR_GJAHR &lt;/P&gt;&lt;P&gt;AND PERIO IN GR_PERIO &lt;/P&gt;&lt;P&gt;AND LEDNR = '00' &lt;/P&gt;&lt;P&gt;AND VERSN IN GR_VERSN &lt;/P&gt;&lt;P&gt;AND WRTTP IN GR_WRTTP &lt;/P&gt;&lt;P&gt;AND BUDAT IN GR_BUDAT &lt;/P&gt;&lt;P&gt;AND PAROB IN GR_PAROB &lt;/P&gt;&lt;P&gt;AND (VT_VAR_COND).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Dec 2009 13:47:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435532#M1411558</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-09T13:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: Select Query Takes more time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435533#M1411559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Erik - this is index COEP&lt;SUB&gt;2. But I think if you check, you'll see that the index exists in the data dictionary, but not in the database. But since the OP has included LEDNR in the SELECT, he is at least trying to use index COEP&lt;/SUB&gt;1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the final analysis, I thjink the solution is to reduce the selection set by limiting OBJNR or just running it in the background and forget about it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rob Burbank on Dec 9, 2009 9:29 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Dec 2009 14:25:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435533#M1411559</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-09T14:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: Select Query Takes more time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435534#M1411560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am thninking to take data from COBK document numbers and Pass this on to COVP to retrieve the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this also works fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Dec 2009 05:09:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435534#M1411560</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-10T05:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: Select Query Takes more time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435535#M1411561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;you got three large NOs .... all three recommendations are wrong!
The SE16 test is going in the right direction ... but what was filled. Nobody knows!!!!&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;I just ran a quick  performance test for &lt;EM&gt;select/Endselect&lt;/EM&gt; and &lt;EM&gt;Into table&lt;/EM&gt; .findings are below&lt;/P&gt;&lt;P&gt;There was a big difference in execution time &lt;/P&gt;&lt;P&gt;Runtime: 10,715,178 microseconds &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Data  : t_bseg type table of BSEG.
Data  : w_bseg  type bseg.
SELECT * FROM bseg up to 100000 rows INTO w_bseg .
  append w_bseg to t_bseg.
ENDSELECT.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Runtime: 5,176,858 microseconds &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Data  : t_bseg type table of bseg.
SELECT * FROM bseg up to 100000 rows INTO TABLE t_bseg.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Dec 2009 06:44:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435535#M1411561</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-10T06:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: Select Query Takes more time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435536#M1411562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; I have cloned KSB1 tcode to custom one as required by business.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your business should just explain their requirements and leave the solution to you &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this is a very critical query and you normally select by small creation date ranges, you could look into adding a secondary index for COBK-CPUDT. I have done this for a long running COVP select in an interface that requires "yesterdays" complete CO postings. Now there is a few extra GB space taken by that index but a runtime of three minutes compared to five hours.&lt;/P&gt;&lt;P&gt;If selection on creation date cannot be narrowed down by default, then don't create the index.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Dec 2009 13:00:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435536#M1411562</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2009-12-10T13:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: Select Query Takes more time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435537#M1411563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&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; There was a big difference in execution time &lt;/P&gt;&lt;P&gt;&amp;gt; Runtime: 10,715,178 microseconds &lt;/P&gt;&lt;P&gt;&amp;gt; Runtime: 5,176,858 microseconds &lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;I would argue that this is not a &lt;U&gt;big&lt;/U&gt; difference. Changing a SELECT to use an index effectively can give a performance improvement of 20 to 30 times. Using an array SELECT rather than SELECT/ENDSELECT will give an improvement of maybe two times. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nothing to be sneezed at, but when someone complains about a performance problem, this is generally not the problem or the solution. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Dec 2009 14:28:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435537#M1411563</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-10T14:28:37Z</dc:date>
    </item>
    <item>
      <title>Re: Select Query Takes more time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435538#M1411564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; Runtime: 10,715,178 microseconds &lt;/P&gt;&lt;P&gt;&amp;gt; Data  : t_bseg type table of BSEG.&lt;/P&gt;&lt;P&gt;&amp;gt; Data  : w_bseg  type bseg.&lt;/P&gt;&lt;P&gt;&amp;gt; SELECT * FROM bseg up to 100000 rows INTO w_bseg .&lt;/P&gt;&lt;P&gt;&amp;gt;   append w_bseg to t_bseg.&lt;/P&gt;&lt;P&gt;&amp;gt; ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Runtime: 5,176,858 microseconds &lt;/P&gt;&lt;P&gt;&amp;gt; Data  : t_bseg type table of bseg.&lt;/P&gt;&lt;P&gt;&amp;gt; SELECT * FROM bseg up to 100000 rows INTO TABLE t_bseg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your difference is much too large, I don't believe it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Always execute it several times and PUT the one which you expect to be faster to the front, or add it again as number 3.&lt;/P&gt;&lt;P&gt;In your measurement I would assume that you measured the effect of database chaching.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Dec 2009 09:26:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435538#M1411564</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-11T09:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: Select Query Takes more time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435539#M1411565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for the info.&lt;/P&gt;&lt;P&gt;i ran the comparison only once in performance examples..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Dec 2009 09:37:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-takes-more-time/m-p/6435539#M1411565</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-11T09:37:26Z</dc:date>
    </item>
  </channel>
</rss>

