‎2008 Mar 13 9:38 AM
Hi,
what is the Difference between select single & select upto 1 row?
Whose performance is better?
Regards,
Mayank
‎2008 Mar 13 9:40 AM
When u have all key fields in WHERE use select single.
And when all key fields are not there in WHERE use SELECT ENDSELECT. in this case SELECT ENDSELECT performance is better.
‎2008 Mar 13 9:40 AM
When u have all key fields in WHERE use select single.
And when all key fields are not there in WHERE use SELECT ENDSELECT. in this case SELECT ENDSELECT performance is better.
‎2008 Mar 13 9:40 AM
‎2008 Mar 13 9:43 AM
Hi
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.
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.
Mainly: to read data from
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.
‎2008 Mar 13 9:44 AM
According to the perfromance point fo view select single is the best because select single will directly fetch the data base by point out....where as select upto will need to be in loop...more iterations shopuld be required...
but one thing should be keep in mind..when we are usiong for a table ...in the table if all the primary fields are selected then only go to the select single other wise go for select upto 1 row.
Reward points if useful...
From
Love