<?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: What is difference between Select Single and Select UPTO 1 rows? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-select-single-and-select-upto-1-rows/m-p/9364903#M1732555</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;While using&lt;STRONG&gt; Select Single&lt;/STRONG&gt; it is necessary to specify all the key fields in the table. Whereas, using &lt;STRONG&gt;Select upto 1 rows&lt;/STRONG&gt;, then its not mandatory to specify all the key fields. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Apr 2013 06:17:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2013-04-09T06:17:01Z</dc:date>
    <item>
      <title>What is difference between Select Single and Select UPTO 1 rows?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-select-single-and-select-upto-1-rows/m-p/9364898#M1732550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had search on many sites but got difference answers as Select Single is faster than upto 4 rows or &lt;/P&gt;&lt;P&gt;upto one rows is fatser than select single...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one of the answer i have got is like &lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Cambria','serif'; color: black;"&gt;If you Google, you will see lots of results that will say SELECT SINGLE is faster and efficient than SELECT UPTO 1 ROWS.&lt;BR /&gt; But that is 100% incorrect.&lt;BR /&gt; &lt;BR /&gt; SELECT UPTO 1 ROWS is faster than SELECT SINGLE.&lt;BR /&gt; If for a WHERE condition, only one record is present in DB, then both are more or less same.&lt;BR /&gt; However, If for a WHERE condition multiple records are present in DB, SELECT UPTO 1 ROWS will perform better than SELECT SINGLE. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Cambria','serif'; color: black;"&gt;and on this link opposite is Given to this&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Cambria','serif'; color: black;"&gt;&lt;A class="active_link" href="http://wiki.sdn.sap.com/wiki/display/HOME/Difference+between+select+single+and+select+upto."&gt;http://wiki.sdn.sap.com/wiki/display/HOME/Difference+between+select+single+and+select+upto.&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Cambria','serif'; color: black;"&gt;(mention line: &lt;SPAN style="color: #000000; font-size: 11.199999809265137px; background-color: #ffffff;"&gt;he System test result showed that the variant Single * takes less time than Up to 1 rows&lt;/SPAN&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Cambria','serif'; color: black;"&gt;Can any one please tell with simple and presise language...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Cambria','serif'; color: black;"&gt;Thanks...&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Cambria','serif'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Cambria','serif'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2013 03:24:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-select-single-and-select-upto-1-rows/m-p/9364898#M1732550</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-04-09T03:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: What is difference between Select Single and Select UPTO 1 rows?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-select-single-and-select-upto-1-rows/m-p/9364899#M1732551</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; suppose in a table you have 10 records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select single * --&amp;gt; using this will fetch you the exact record,the catch is you need to use all the primary key in the where condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select upto 1 row -&amp;gt; it will fetch you the first record. suppose in the select query is not based on the primary key, then it may fetch more than one record and in that it will fetch the first record which is there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ramesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2013 06:07:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-select-single-and-select-upto-1-rows/m-p/9364899#M1732551</guid>
      <dc:creator>former_member282823</dc:creator>
      <dc:date>2013-04-09T06:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: What is difference between Select Single and Select UPTO 1 rows?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-select-single-and-select-upto-1-rows/m-p/9364900#M1732552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi nikita,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Arial;"&gt;In order to check for the existence of a record then it is better to use SELECT SINGLE than using SELECT ..UP TO 1 ROWS since it uses low memory and has better performance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: Arial; color: #333333;"&gt;The only difference is the ABAP syntax prevents from using ORDER BY with SELECT SINGLE, but it is allowed with SELECT .. UP TO 1 ROWS.&lt;/SPAN&gt; &lt;SPAN style="font-size: 13px; font-family: Arial; color: #333333;"&gt;Thus, if several records may be returned and we want to get the highest record for example, SELECT SINGLE cannot be used, but SELECT …UP TO 1 ROWS WHERE … ORDER BY .. may be used.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: Arial; color: #333333;"&gt;thanks and regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: Arial; color: #333333;"&gt;narayan&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2013 06:07:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-select-single-and-select-upto-1-rows/m-p/9364900#M1732552</guid>
      <dc:creator>uppu_narayan</dc:creator>
      <dc:date>2013-04-09T06:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: What is difference between Select Single and Select UPTO 1 rows?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-select-single-and-select-upto-1-rows/m-p/9364901#M1732553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nikitha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select single is the fastest select statement to get the data from the database table but here the manadatory thing is you should use the complete primary key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we are not having the complete primary key if u r using select single it will not fetch the exact record which you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we are not having the complete primary key then we will go for select upto 1 rows and one more important thing is dont use more than 1 rows when u r going upto n rows statement it will be performance issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so atlast, if you are having complete primary key use select single else go for select upto 1 rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this clears your doubt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pavan Neerukonda.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2013 06:09:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-select-single-and-select-upto-1-rows/m-p/9364901#M1732553</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-04-09T06:09:16Z</dc:date>
    </item>
    <item>
      <title>Re: What is difference between Select Single and Select UPTO 1 rows?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-select-single-and-select-upto-1-rows/m-p/9364902#M1732554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi nikita ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Select single will fetch the particular Ex: sales order ; 1000006&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select upto 1 row will fetch the original sales order no:1000006&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single is for more dynamic and for performance issu we use that.&lt;/P&gt;&lt;P&gt;select upto rows its performance is little bit later....for performing the actions&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2013 06:15:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-select-single-and-select-upto-1-rows/m-p/9364902#M1732554</guid>
      <dc:creator>kabil_g</dc:creator>
      <dc:date>2013-04-09T06:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: What is difference between Select Single and Select UPTO 1 rows?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-select-single-and-select-upto-1-rows/m-p/9364903#M1732555</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;While using&lt;STRONG&gt; Select Single&lt;/STRONG&gt; it is necessary to specify all the key fields in the table. Whereas, using &lt;STRONG&gt;Select upto 1 rows&lt;/STRONG&gt;, then its not mandatory to specify all the key fields. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2013 06:17:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-select-single-and-select-upto-1-rows/m-p/9364903#M1732555</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-04-09T06:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: What is difference between Select Single and Select UPTO 1 rows?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-select-single-and-select-upto-1-rows/m-p/9364904#M1732556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;Hi, &lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;Check the below link .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&lt;A _jive_internal="true" href="https://answers.sap.com/message/5019598#5019598"&gt;http://scn.sap.com/message/5019598#5019598&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;According to SAP Performance course the SELECT UP TO 1 ROWS is faster than SELECT SINGLE because you are not using all the primary key fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;select single is a construct designed to read database records with primary key. In the absence of the primary key, it might end up doing a sequential search, whereas the select up to 1 rows may assume that there is no primary key supplied and will try to find most suitable index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;The best way to find out is through sql trace or runtime analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;Use "select up to 1 rows" only if you are sure that all the records returned will have the same value for the field(s) you are interested in. If not, you will be reading only the first record which matches the criteria, but may be the second or the third record has the value you are looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;The System test result showed that the variant Single * takes less time than Up to 1 rows as there is an additional level for COUNT STOP KEY for SELECT ENDSELECT UP TO 1 ROWS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;The 'SELECT SINGLE' statement selects the first row in the database that it finds that fulfils the 'WHERE' clause If this results in multiple records then only the first one will be returned and therefore may not be unique.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;Mainly: to read data from&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;The 'SELECT .... UP TO 1 ROWS' statement is subtly different. The database selects all of the relevant records that are defined by the WHERE clause, applies any aggregate, ordering or grouping functions to them and then returns the first record of the result set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&lt;A _jive_internal="true" href="https://answers.sap.com/message/4738438#4738438" style="font-style: inherit; font-family: inherit; color: #3778c7;"&gt;diff between select single * or upto one row&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&lt;A _jive_internal="true" href="https://answers.sap.com/message/5019598#5019598" style="font-style: inherit; font-family: inherit; color: #3778c7;"&gt;select single vs select upto one row&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&lt;A _jive_internal="true" href="https://answers.sap.com/message/4915073#4915073" style="font-style: inherit; font-family: inherit; color: #3778c7;"&gt;difference between select single and select upto 1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;Regards&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;Mahesh &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1353/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2013 06:19:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-select-single-and-select-upto-1-rows/m-p/9364904#M1732556</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-04-09T06:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: What is difference between Select Single and Select UPTO 1 rows?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-select-single-and-select-upto-1-rows/m-p/9364905#M1732557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;I hope that this is a simple explanation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select ... up to n ROWS is a ways that could read a fixed number of data records. &lt;/P&gt;&lt;P&gt;Only the requested number of data records are trasferred from the DB to the application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single * ...allows you to read a single record from a DB table. &lt;/P&gt;&lt;P&gt;for this scope, all the key fields must be filled by WHERE condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ivan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2013 07:13:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-select-single-and-select-upto-1-rows/m-p/9364905#M1732557</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-04-09T07:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: What is difference between Select Single and Select UPTO 1 rows?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-select-single-and-select-upto-1-rows/m-p/9364906#M1732558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nikita&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For simple understanding, select upto 1 row will fetch the first record from the database table irrespective of evrything. just will fetch the very first record.&lt;/P&gt;&lt;P&gt;In select single, it will fetch also only one record but based on certain condition of primary key etc, hence statement will execute till it satisfies the condition to display the first record found.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Moreover, lets say a database table has 100000 record . select single conditions might be satissfies for the last record i.e. record number 100000 which is not in the case of select upto 1 row.&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;Vaibhav &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2013 07:23:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-select-single-and-select-upto-1-rows/m-p/9364906#M1732558</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-04-09T07:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: What is difference between Select Single and Select UPTO 1 rows?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-select-single-and-select-upto-1-rows/m-p/9364907#M1732559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi Nikita,&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;There are many posts about this in SCN, however it is not easy to get final correct information as many copy paste same examples in different posts.&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;I recommend you to go through this discussion:&lt;/DIV&gt;&lt;DIV&gt;&lt;A _jive_internal="true" href="https://answers.sap.com/thread/1730155"&gt;http://scn.sap.com/thread/1730155&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="text-decoration: underline;"&gt;In general there is rather no performance difference between SELECT SINGLE and SELECT UP TO 1 ROW&lt;/SPAN&gt;, for sure you will not notice it. Two important functional differences:&lt;/DIV&gt;&lt;UL&gt;&lt;LI&gt;SELECT SINGLE has simpler syntax.&lt;/LI&gt;&lt;LI&gt;SELECT UP TO offers more additional options like grouping, sorting etc.&lt;/LI&gt;&lt;/UL&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;I read opinions that SELECT UP TO in addition prepares full query result in database buffer, but still returns only single row result. Although theoretically this means it would work slower, I have not noticed it in my test when searching for 116 572 duplicates have similar results for SELECT UP TO and SELECT SINGLE so I doubt if all these rows are cached. But this may depend on database implementation as well.&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;To clarify what some people wrote, it is not true that you cannot use SELECT SINGLE if you do not use primary key in WHERE condition or if there are duplicated results found - SELECT SINGLE and SELECT UP TO have same functional meaning, can be used at any time, both will return just one row that fulfils criteria of WHERE condition. In addition with SELECT UP TO you can sort results and influence which first row you want to get.&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;After reading many different opinions from people, I was curious about real results and I did small test with ABAP report, ORACLE database and 10000 queries repetition on GLPCA table with rows 116 572, not too much but still some representatives. Table has secondary indexes that I also use for comparison. And results are as expected -&amp;nbsp; sometimes SELECT SINGLE was faster, sometimes SELECT UP TO 1 ROW - &lt;SPAN style="text-decoration: underline;"&gt;there is no rule&lt;/SPAN&gt;. Maybe I could notice difference if table size was much bigger, but I do not think there would be remarkable difference anyhow.&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Important figure of ST05 results:&lt;/DIV&gt;&lt;DIV&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/203409" height="91" width="815" /&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;- Select statement on primary key is represented as slightly different database queries in ST05 logs - SELECT SINGLE do not adds ROWNUM validation to database query:&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;DIV&gt;SELECT SINGLE * FROM &lt;SPAN style="font-size: 10pt;"&gt;glpca&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt; INTO &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;ls_glpca&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt; WHERE &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;gl_sirid&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 10pt;"&gt;'000000000000104901'&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt; .&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;is 4th row in the ST05 results figure:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;SELECT WHERE "RCLNT"=:A0 AND "GL_SIRID"=:A1&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;DIV&gt;SELECT * FROM &lt;SPAN style="font-size: 10pt;"&gt;glpca&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt; UP TO &lt;/SPAN&gt;&lt;SPAN style="color: #3399ff; font-size: 10pt;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt; ROWS INTO &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;ls_glpca&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt; WHERE &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;gl_sirid&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 10pt;"&gt;'000000000000104901'&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;is 3rd row in the ST05 results figure:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;SELECT WHERE "RCLNT"=:A0 AND "GL_SIRID"=:A1 AND ROWNUM &amp;lt;=:A2&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;So we see only small difference in addition "AND ROWNUM &amp;lt;= :A2". Because it is primary and only single value will be found, it seems to be unnecessary to add ROWNUM which is done for SELECT UP TO 1 row statement.&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="text-decoration: underline;"&gt;Both queries use same primary index.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;- Select statement on field that is not primary key and has many duplicated values&amp;nbsp; (all rows in table have same value of RLDNR) or has only single value (only one DOCNR) are also represented as same database query - no difference in ST05 query between SELECT SINGLE and SELECT UP TO 1 row. We see 20 000 of same statement execution for first and second line of ST05 results figure - it means that SELECT SINGLE and SELECT UP TO 1 ROW are treated as same statement and use same secondary index in case of non primary key query:&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;SELECT WHERE "RCLNT"=:A0 AND "RLDNR"=:A1 AND ROWNUM &amp;lt;=:A2 &lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000; font-size: 10pt; text-decoration: underline;"&gt;Both queries SELECT SINGLE and SELECT UP TO 1 ROW use same secondary index.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;And time res&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;ults related to this ST05 measurement:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/203410" width="450" /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;And another example:&lt;/DIV&gt;&lt;DIV&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/203430" width="450" /&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;If I run test many times, advantage of different queries changes randomly so there is no constant pattern. That is why I would not judge which one is faster. I always use SELECT SINGLE as it has simpler syntax, often using it to check if row with values exists in database or not (do not care how much, just one is enough for confirmation). I would use UP TO 1 ROW if I wanted to sort by some column and get first row that meets WHERE conditions with maximum value for column that I sorted.&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Regards,&lt;/DIV&gt;&lt;DIV&gt;Adam&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2013 11:55:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-select-single-and-select-upto-1-rows/m-p/9364907#M1732559</guid>
      <dc:creator>adam_krawczyk1</dc:creator>
      <dc:date>2013-04-09T11:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: What is difference between Select Single and Select UPTO 1 rows?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-select-single-and-select-upto-1-rows/m-p/9364908#M1732560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2013 18:18:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-select-single-and-select-upto-1-rows/m-p/9364908#M1732560</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-04-09T18:18:47Z</dc:date>
    </item>
    <item>
      <title>Re: What is difference between Select Single and Select UPTO 1 rows?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-select-single-and-select-upto-1-rows/m-p/9364909#M1732561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great response, Adam - thank you! Hopefully we can put this to rest now. &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1353/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2013 18:22:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-select-single-and-select-upto-1-rows/m-p/9364909#M1732561</guid>
      <dc:creator>Jelena_Perfiljeva</dc:creator>
      <dc:date>2013-04-09T18:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: What is difference between Select Single and Select UPTO 1 rows?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-select-single-and-select-upto-1-rows/m-p/9364910#M1732562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank U All for your valuable replay..&amp;nbsp;&amp;nbsp; &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1410/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Apr 2013 19:11:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-difference-between-select-single-and-select-upto-1-rows/m-p/9364910#M1732562</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-04-25T19:11:40Z</dc:date>
    </item>
  </channel>
</rss>

