<?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: diff between select single * or upto one row in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/diff-between-select-single-or-upto-one-row/m-p/3287382#M786459</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;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&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&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&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&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&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&gt;Mainly:  to read data from &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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&gt;Mainly: to check if entries exist. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhaskar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Jan 2008 05:44:28 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-18T05:44:28Z</dc:date>
    <item>
      <title>diff between select single * or upto one row</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/diff-between-select-single-or-upto-one-row/m-p/3287379#M786456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;what is the difference between select single *   &lt;STRONG&gt;and&lt;/STRONG&gt;   select upto one row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;krishna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jan 2008 05:38:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/diff-between-select-single-or-upto-one-row/m-p/3287379#M786456</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-18T05:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: diff between select single * or upto one row</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/diff-between-select-single-or-upto-one-row/m-p/3287380#M786457</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;select single * will retrieve the first record it satisfies the where condition &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;salect upto will collect all the records it satisfies the where condition  and gives u the first record fom group of records &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jan 2008 05:43:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/diff-between-select-single-or-upto-one-row/m-p/3287380#M786457</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-18T05:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: diff between select single * or upto one row</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/diff-between-select-single-or-upto-one-row/m-p/3287381#M786458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&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&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&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&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&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&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&gt;Mainly: to read data from &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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&gt;Mainly: to check if entries exist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jan 2008 05:44:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/diff-between-select-single-or-upto-one-row/m-p/3287381#M786458</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-18T05:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: diff between select single * or upto one row</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/diff-between-select-single-or-upto-one-row/m-p/3287382#M786459</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;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&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&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&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&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&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&gt;Mainly:  to read data from &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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&gt;Mainly: to check if entries exist. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhaskar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jan 2008 05:44:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/diff-between-select-single-or-upto-one-row/m-p/3287382#M786459</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-18T05:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: diff between select single * or upto one row</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/diff-between-select-single-or-upto-one-row/m-p/3287383#M786460</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;Select single * - it will check all the possible records finally displays only a record.&lt;/P&gt;&lt;P&gt;upto one row - it will display only the first possible record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prabakaran.S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jan 2008 05:51:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/diff-between-select-single-or-upto-one-row/m-p/3287383#M786460</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-18T05:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: diff between select single * or upto one row</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/diff-between-select-single-or-upto-one-row/m-p/3287384#M786461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi murali,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; The main difference is &lt;/P&gt;&lt;P&gt;SELECT UP TO 1 ROWS is faster than SELECT SINGLE because you are not using all the primary key fields. i.e.,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select single * -&lt;/P&gt;&lt;HR originaltext="----" /&gt;&lt;P&gt;means----&lt;/P&gt;&lt;HR originaltext="-------" /&gt;&lt;P&gt;it will check all the possible records finally displays only a record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;upto one row -&lt;/P&gt;&lt;HR originaltext="------" /&gt;&lt;P&gt;means----&lt;/P&gt;&lt;HR originaltext="------" /&gt;&lt;P&gt; it will display only the first possible record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;kindly reward me if it's ok or any issues let me know&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jan 2008 05:57:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/diff-between-select-single-or-upto-one-row/m-p/3287384#M786461</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-18T05:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: diff between select single * or upto one row</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/diff-between-select-single-or-upto-one-row/m-p/3287385#M786462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;     If SINGLE is specified, the resulting set has a single line. If the remaining additions to the SELECT command select more than one line from the database, the first line that is found is entered into the resulting set.&lt;/P&gt;&lt;P&gt;   And upto one row will give the first record from dataset without checking the key. &lt;/P&gt;&lt;P&gt;   So it is faster than select single.&lt;/P&gt;&lt;P&gt;Reward points if you are satisfied by this answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: smita adkar on Jan 18, 2008 11:20 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jan 2008 10:19:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/diff-between-select-single-or-upto-one-row/m-p/3287385#M786462</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-18T10:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: diff between select single * or upto one row</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/diff-between-select-single-or-upto-one-row/m-p/3287386#M786463</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;SELECT UP TO 1 ROWS is faster than SELECT SINGLE *&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE *  will check all the possible records and finally displays only one record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT UP TO 1 ROWS will display only the first possible record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Sunanda.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jan 2008 12:36:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/diff-between-select-single-or-upto-one-row/m-p/3287386#M786463</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-18T12:36:42Z</dc:date>
    </item>
  </channel>
</rss>

