<?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: Check for problematic SELECT * using Code Inspector in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-problematic-select-using-code-inspector/m-p/11445010#M1928542</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Both a and d could be correct depending on the way it is tackled.&lt;/P&gt;&lt;P&gt;Lets assume we have columns named column_1, column_2....to column_100. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the number of columns used are column_1 to column_21 and if the % set is 20 then there will be no error thrown when select * is used. This way by not throwing an error we are calling remaining 79 columns which are not required causing performance issue in HANA database. This problem will further increased if we reduced the percentage from 20.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the other hand let say we increase the percentage to 30 or 40. If we use only 20 columns but call 30 columns in the select query there will be no error thrown in this case as well causing performance issue due to these additional 10 columns being called. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assuming that you never use select * as an experienced developer reducing the % from 20 will have more benefit because statistically we are likely to use&amp;nbsp; less than 20% columns for any select queries and having a error message for using 21% columns will not cause dramatic performance issues even if you ignore to correct it. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Sep 2016 07:47:09 GMT</pubDate>
    <dc:creator>alwinkoshy2000</dc:creator>
    <dc:date>2016-09-28T07:47:09Z</dc:date>
    <item>
      <title>Check for problematic SELECT * using Code Inspector</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-problematic-select-using-code-inspector/m-p/11445009#M1928541</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;I'm currently reading the course HA400 "ABAP Programming for SAP HANA" and I have an inclear issue concerning the problematic &lt;STRONG&gt;SELECT * statement using the Code Inspector&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Exam Sample for "SAP Certified Development Specialist - ABAP for SAP HANA (Edition 2015)"&lt;/P&gt;&lt;P&gt;Link: &lt;A href="https://training.sap.com/shop/certification/e_hanaaw151-sap-certified-development-specialist---abap-for-sap-hana-edition-2015-g/" title="https://training.sap.com/shop/certification/e_hanaaw151-sap-certified-development-specialist---abap-for-sap-hana-edition-2015-g/#"&gt;https://training.sap.com/shop/certification/e_hanaaw151-sap-certified-development-specialist---abap-for-sap-hana-edition-2015-g/#&lt;/A&gt;&lt;/P&gt;&lt;P&gt;we got the following Question:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P style="font-size: 13.3333px;"&gt;1. You create a check variant in the Code Inspector which includes the check 'Search problematic Select *&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;statements'. SAP HANA is used as the database&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;In the check parameters, which value would you use for the percentage of fields that are effectively used?&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;Please choose the correct answer.:&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;a) A lower value than on a traditional, row-store only based database&amp;nbsp; &lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;b) The same value as on a traditional, row-store only based database&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;c) A value that you calculate based on the number of tables&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;d) A higher value than on a traditional, row-store only based database&lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, only answer a) or d) came in question.&lt;/P&gt;&lt;P&gt;I have tipped for answer a) which was the correct answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I have get a problem of understanding this:&lt;/P&gt;&lt;P&gt;In the HA400 course documentation of the year 2015, it saids on page 75/76 the following:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;The check for problematic SELECT * statements in particular has several check parameters. This check searches for SELECT * FROM dbtab statements where less than a specified percentage of the fields are effectively used. &lt;EM&gt;&lt;STRONG&gt;The default value for the percentage is 20 percent. If less than 20 percent of the fields are used it is more efficient to select only the used fields&lt;/STRONG&gt;&lt;/EM&gt;. The value if this parameter highly depends on the database used. &lt;/SPAN&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;EM&gt;When on a database with column store, e.g. SAP HANA, this value should be set to a lower value than on a traditional, row store only database&lt;/EM&gt;.&lt;/STRONG&gt;&lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, if the "percentage of fields" is set to 20% it has to be set for SAP HANA to a lower value e.g. 10% (Answer 'a)' )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;This is actually not correct to my point of view&lt;/SPAN&gt;, &lt;SPAN style="font-size: 10pt;"&gt;we need to have a higher value (Answer 'b)' ), e.g. 40% or 60%. As all problematic SELECT * statements which have between 1% and 40% of fields not used will be listed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;When we go to the HA400 course document of the year 2013, it was said at page 57 that the value should be HIGHER than on a traditional row store database:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;The check for problematic SELECT * statements in particular has several check&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;parameters. This check searches for SELECT * FROM dbtab statements where&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;less than a specified percentage of the fields are effectively used. The default value&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;for the percentage is 20 percent. If less than 20 percent of the fields are used it is&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;more efficient to select only the used fields.&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;The value if this parameter highly depends on the database used. When on a&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;database with column store, e.g. SAP HANA, &lt;STRONG&gt;this value should be set to a higher&lt;/STRONG&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;value than on a traditional, row store only database.&lt;/STRONG&gt;&lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm quick not well understanding the context of phrases.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For ME, the percent need to increase from 20% to 40% or upper, as we don't like to transport all columns with HANA. This operation is quite costly for column-Store. That is why the search for SELECT * need to have all entries which have a lower percentage of use of the fields than e.g. 40%.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Me the answer is d)&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333px;"&gt;d) A higher value than on a traditional, row-store only based database&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333px;"&gt;HA400 Course 2013, Page 57&lt;/SPAN&gt;&lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333px;"&gt;But SAP said a)&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333px;"&gt;a) A lower value than on a traditional, row-store only based database&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333px;"&gt;HA400 Course 2015, Page 76&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really don't know why they changed it.&lt;/P&gt;&lt;P&gt;Can, anyone with some English Skills find a solution for this ambiguity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your repond,&lt;/P&gt;&lt;P&gt;Kais&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Dec 2015 16:35:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-problematic-select-using-code-inspector/m-p/11445009#M1928541</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-12-03T16:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: Check for problematic SELECT * using Code Inspector</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-problematic-select-using-code-inspector/m-p/11445010#M1928542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Both a and d could be correct depending on the way it is tackled.&lt;/P&gt;&lt;P&gt;Lets assume we have columns named column_1, column_2....to column_100. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the number of columns used are column_1 to column_21 and if the % set is 20 then there will be no error thrown when select * is used. This way by not throwing an error we are calling remaining 79 columns which are not required causing performance issue in HANA database. This problem will further increased if we reduced the percentage from 20.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the other hand let say we increase the percentage to 30 or 40. If we use only 20 columns but call 30 columns in the select query there will be no error thrown in this case as well causing performance issue due to these additional 10 columns being called. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assuming that you never use select * as an experienced developer reducing the % from 20 will have more benefit because statistically we are likely to use&amp;nbsp; less than 20% columns for any select queries and having a error message for using 21% columns will not cause dramatic performance issues even if you ignore to correct it. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2016 07:47:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-problematic-select-using-code-inspector/m-p/11445010#M1928542</guid>
      <dc:creator>alwinkoshy2000</dc:creator>
      <dc:date>2016-09-28T07:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: Check for problematic SELECT * using Code Inspector</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-problematic-select-using-code-inspector/m-p/11445011#M1928543</link>
      <description>&lt;P&gt;To resolve that and skip this validation, use dinamic select ('*') instead select *&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jul 2020 02:43:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-problematic-select-using-code-inspector/m-p/11445011#M1928543</guid>
      <dc:creator>raphaelbertani</dc:creator>
      <dc:date>2020-07-03T02:43:14Z</dc:date>
    </item>
  </channel>
</rss>

