<?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  * ... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2576236#M588735</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;Yes, select * will all ways effects the performance of the program. Instead u can use specific fields in the select query which are only required. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Out of 10 u may not require all fields. So, select only required fields in the select query.&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;Sankar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Aug 2007 11:20:41 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-06T11:20:41Z</dc:date>
    <item>
      <title>select  * ...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2576234#M588733</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;There are some queries in my program where select * is used.&lt;/P&gt;&lt;P&gt;Are they harmful performance wise ?&lt;/P&gt;&lt;P&gt;Shall I use each and every field instead of this, as the no. of fields is 10.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Binay.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2007 11:09:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2576234#M588733</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-06T11:09:34Z</dc:date>
    </item>
    <item>
      <title>Re: select  * ...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2576235#M588734</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 how many fields you want to use in your program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are not making use of all the fields of the table then it is better to mention them in the select unless there are to many fields too mention..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are using allmost all of the fields then go for *.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But * will take more time as it fetches more data than selecing few fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Generally its because of the lazyness of typing all the fields that most of us use * &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Hint: goto SE30 and there click on Tips&amp;amp; Tricks button to see more of the performance realted tips.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2007 11:14:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2576235#M588734</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2007-08-06T11:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: select  * ...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2576236#M588735</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;Yes, select * will all ways effects the performance of the program. Instead u can use specific fields in the select query which are only required. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Out of 10 u may not require all fields. So, select only required fields in the select query.&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;Sankar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2007 11:20:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2576236#M588735</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-06T11:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: select  * ...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2576237#M588736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hii BSM,&lt;/P&gt;&lt;P&gt;Yes u said it rightly.&lt;/P&gt;&lt;P&gt;You should avoid the use of &amp;lt;b&amp;gt;select *&amp;lt;/b&amp;gt; and as you said there are only 10 fields,&lt;/P&gt;&lt;P&gt;its ok in this case.&lt;/P&gt;&lt;P&gt;But imagine the situation where you have a big table(Eg.Mara,EKKo etc.)&lt;/P&gt;&lt;P&gt;and you need only 10-15 fields, So how much overhead yiu r giving to the system.&lt;/P&gt;&lt;P&gt;So its gud practice to give the name of columns than select *.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps in ur understanding..&lt;/P&gt;&lt;P&gt;Reward points if helpful..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ashish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2007 11:30:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2576237#M588736</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-06T11:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: select  * ...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2576238#M588737</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 through the following links for performance &lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/cccad390-0201-0010-5093-fd9ec8157802" target="test_blank"&gt;https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/cccad390-0201-0010-5093-fd9ec8157802&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.asug.com/client_files/Calendar/Upload/ASUG%205-mar-2004%20BW%20Performance%20PDF.pdf" target="test_blank"&gt;http://www.asug.com/client_files/Calendar/Upload/ASUG%205-mar-2004%20BW%20Performance%20PDF.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/1955ba90-0201-0010-d3aa-8b2a4ef6bbb2" target="test_blank"&gt;https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/1955ba90-0201-0010-d3aa-8b2a4ef6bbb2&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if it helps..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Omkar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2007 11:39:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2576238#M588737</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-06T11:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: select  * ...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2576239#M588738</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 USE SELECT *  IN UR PROGRAM WITH PROPER WHERE CONDITION (ON PRIMARY KEYS OR SECONDRY KEYS ) IT WILL BE OK OTHER WISE &lt;/P&gt;&lt;P&gt;IT WILL GO INTO PERFORMANCE PROBLEMS &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REWARD IF USEFULL&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2007 12:42:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2576239#M588738</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-06T12:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: select  * ...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2576240#M588739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Performance problems on database selects arise from problems with indexs and not from the usage of select * or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can improve a statement by specifying a field list:&lt;/P&gt;&lt;P&gt;+ However you should only do it, if you can reduce the number of fields by a factor of 2.&lt;/P&gt;&lt;P&gt;+ And you should not create statement which differ only in the field list, where clause etc identical). Better create a long enough field list which can be used by&lt;/P&gt;&lt;P&gt;all users.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Siegfried&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2007 12:46:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2576240#M588739</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-06T12:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: select  * ...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2576241#M588740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The transfer of data from the database to the application server is done in blocks whose size depends on the environment / database / etc.  When you do a select then the database server runs the SQL and gets the matching records, and then passes them in blocks to the application server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This can be seen in SQL trace for any large select:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select *&lt;/P&gt;&lt;P&gt;   from trdir into table t_data up to p_cnt rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    3.255 TRDIR      REOPEN             0 SELECT WHERE ROWNUM &amp;lt;= 5000&lt;/P&gt;&lt;P&gt;    5.572 TRDIR      FETCH     721      0                            &lt;/P&gt;&lt;P&gt;    5.149 TRDIR      FETCH     721      0                            &lt;/P&gt;&lt;P&gt;    5.184 TRDIR      FETCH     721      0                            &lt;/P&gt;&lt;P&gt;    5.275 TRDIR      FETCH     721      0                            &lt;/P&gt;&lt;P&gt;    5.616 TRDIR      FETCH     721      0                            &lt;/P&gt;&lt;P&gt;    5.338 TRDIR      FETCH     721      0                            &lt;/P&gt;&lt;P&gt;    4.709 TRDIR      FETCH     674      0                            &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the above select 721 records are returned from TRDIR in each block using select *, with 674 in the last fetch&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;changing it to select a few fields:&lt;/P&gt;&lt;P&gt;SELECT name sqlx edtx varcl dbapl&lt;/P&gt;&lt;P&gt;   FROM trdir INTO TABLE t_data UP TO p_cnt ROWS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    3.366 TRDIR      REOPEN             0 SELECT WHERE ROWNUM &amp;lt;= 5000&lt;/P&gt;&lt;P&gt;    1.796 TRDIR      FETCH   2.645      0                            &lt;/P&gt;&lt;P&gt;    3.936 TRDIR      FETCH   2.355      0                            &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here 2645 records fetched first time, 2355 second fetch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Less trips between the database and the application server will improve program performance, especially in production environments where the two are often separate physical servers.  This can be seen by totalling the duration of the above two examples (first column) - 40,098 versus 9,098.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2007 13:34:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2576241#M588740</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-06T13:34:08Z</dc:date>
    </item>
    <item>
      <title>Re: select  * ...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2576242#M588741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Definitely &amp;#145;Select*&amp;#146; statement makes the performance issue so that you can choose the following ways which it better for performance issues.&lt;/P&gt;&lt;P&gt;-	Write the select statement with required field names instead of all fields (*) which avoids the performance issue.&lt;/P&gt;&lt;P&gt;-	Along with selected field names you may also take care in where condition: you should use only key fields in the where conditions and also maintain the sequence of key fields which they occurred in table if possible.&lt;/P&gt;&lt;P&gt;-	Suppose if you use the non-key fields in where condition it makes lot of performance issues and there is no options to use key-fields then you have to create the secondary index for those non-key fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope these points will be useful to you avoid the performance issues.&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>Tue, 07 Aug 2007 07:49:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2576242#M588741</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-07T07:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: select  * ...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2576243#M588742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; Definitely &amp;#145;Select*&amp;#146; statement makes the performance issue &lt;/P&gt;&lt;P&gt;defintely not, it improves a bit, but this is not an issue&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other recommendation you are making could lead to an issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The where should always contain ALL fields which are known, independent of the fact whether they are in the primary key or in a seconday key!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The order of the fields is actually irrelevant, but it is still recommended to use the order of the optimal index. The index design must take care that the indices are not too similar, otherwise the index determination of the database can go wrong and a suboptimal index is issued. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&amp;gt; Database access which are not optimally supported by indexes are the performance issue, making statement 10, 100 or even several thousand times slower than necessary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The improvement of a field list for a table with 10 (not extremely long, no string) fields is in the range of 10 maybe 20%, i.e. a nice to have.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Siegfried&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2007 09:12:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2576243#M588742</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-07T09:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: select  * ...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2576244#M588743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Upto 16 fields u can specify it in the select query and its always better to use it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Neslin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2007 09:31:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2576244#M588743</guid>
      <dc:creator>Neslinn</dc:creator>
      <dc:date>2007-08-07T09:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: select  * ...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2576245#M588744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The general recommendation is to avoid SELECT *, but the savings are minimal. There are far more important things to take care of first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;a href="/people/rob.burbank/blog/2006/11/16/performance--what-will-kill-you-and-what-will-leave-you-with-only-a-flesh-wound"&amp;gt;Performance - what will kill you and what will leave you with only a flesh wound&amp;lt;/a&amp;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, 07 Aug 2007 13:26:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2576245#M588744</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-07T13:26:53Z</dc:date>
    </item>
  </channel>
</rss>

