<?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 performance. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-performance/m-p/1539813#M245993</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;  When we are using packet size as 100 ,the system gets 100 records from the database for every loop. So, for getting every 100 records, it hits the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sailaja.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Aug 2006 06:14:19 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-08-16T06:14:19Z</dc:date>
    <item>
      <title>Select query performance.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-performance/m-p/1539803#M245983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can somebody explain me which is the better option provided we have large data selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * into table it_mara from mara.&lt;/P&gt;&lt;P&gt;                            or&lt;/P&gt;&lt;P&gt;select * appending table it_mara from mara package size 10000.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please tell me as i don't have large data in my development system.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2006 06:03:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-performance/m-p/1539803#M245983</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-16T06:03:45Z</dc:date>
    </item>
    <item>
      <title>Re: Select query performance.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-performance/m-p/1539804#M245984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;select * into table it_mara from mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is better out of 2.&lt;/P&gt;&lt;P&gt;Try selecting only those fields which are required instead of using select *.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;VJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2006 06:07:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-performance/m-p/1539804#M245984</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-16T06:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: Select query performance.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-performance/m-p/1539805#M245985</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;Go for second one&lt;/P&gt;&lt;P&gt;select * appending table it_mara from mara package size 10000.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2006 06:07:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-performance/m-p/1539805#M245985</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-16T06:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: Select query performance.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-performance/m-p/1539806#M245986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; select * into table it_mara from mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a better as it does not go through a limit and there is only one hit on the database&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;Note : Please mark all the helpful answes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2006 06:07:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-performance/m-p/1539806#M245986</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-16T06:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: Select query performance.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-performance/m-p/1539807#M245987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the first option is better, if possible select only the fields which you need instead of selecting all the fields, if there is any where condition try to use the Index.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2006 06:09:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-performance/m-p/1539807#M245987</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-16T06:09:27Z</dc:date>
    </item>
    <item>
      <title>Re: Select query performance.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-performance/m-p/1539808#M245988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Phani, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First check if you really need to select all fields of table MARA. If you just need a specfic number of records then you could use UP TO n ROWS in your select. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S. Please award points for useful answers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2006 06:09:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-performance/m-p/1539808#M245988</guid>
      <dc:creator>aris_hidalgo</dc:creator>
      <dc:date>2006-08-16T06:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: Select query performance.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-performance/m-p/1539809#M245989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;Addition &lt;/P&gt;&lt;P&gt;... PACKAGE SIZE n &lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Works like ... INTO wa, except that the selected data is not placed in the internal table itab line by line, but in packets of n lines. The old contents of itab are overwritten. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;n &amp;lt;= 0 causes a runtime error. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Internally, n is placed in a type I field. Here, the usual conversion rules apply (see MOVE). &lt;/P&gt;&lt;P&gt;After leaving the processing loop, the contents of the internal table itab are undefined. &lt;/P&gt;&lt;P&gt;If the result of the selection is a table, the data is retrieved in a processing loop introduced by SELECT and concluded by ENDSELECT. The processing passes through the loop once for each line read.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2006 06:09:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-performance/m-p/1539809#M245989</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-16T06:09:48Z</dc:date>
    </item>
    <item>
      <title>Re: Select query performance.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-performance/m-p/1539810#M245990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What exactly is the differnce in database access when we use packet size?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2006 06:10:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-performance/m-p/1539810#M245990</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-16T06:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: Select query performance.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-performance/m-p/1539811#M245991</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 depends on the data.&lt;/P&gt;&lt;P&gt;  If we are having less data, so for &lt;/P&gt;&lt;P&gt;  Select * into table it_mara from mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  If you are having huge amount of data. &lt;/P&gt;&lt;P&gt;  Then we have to go for &lt;/P&gt;&lt;P&gt;  Select * appending table it_mara from mara package size 10000. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Ex: If there is a select which executes for a long time, if this time is exceeding the limit of timeout., then we get data in packages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sailaja.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2006 06:12:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-performance/m-p/1539811#M245991</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-16T06:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: Select query performance.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-performance/m-p/1539812#M245992</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;When you Use Packet size then in your case it will fetch 10000 records and then again starts from 10001to 20000 records. if you have millions of records then Packet size is better option. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2006 06:12:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-performance/m-p/1539812#M245992</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-16T06:12:53Z</dc:date>
    </item>
    <item>
      <title>Re: Select query performance.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-performance/m-p/1539813#M245993</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;  When we are using packet size as 100 ,the system gets 100 records from the database for every loop. So, for getting every 100 records, it hits the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sailaja.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2006 06:14:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-performance/m-p/1539813#M245993</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-16T06:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: Select query performance.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-performance/m-p/1539814#M245994</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;If you don`t have too many records to be fetched, use select &amp;lt;fieldlist.......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Your first query fetches all records and make sure that the primary key of the table are addressed in where conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. By adding appending addition you append records into your internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To ensure optimized code, use your select query with all key additions in the where clause, avoid endselect and only select fields which are needed instead of all fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope the info. is helpful, reward points if so.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2006 06:30:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-performance/m-p/1539814#M245994</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-16T06:30:49Z</dc:date>
    </item>
  </channel>
</rss>

