Wat is the difference between Select single * and Select ..
Up to one row . And which method is better for performance ?
Answers were Sorted based on User's Feedback
Answer / arjun manglekar
1)SELECT single retrives only one record which ever come
across first in data base query
SELECT ..upto 1 row , all records are fetched into a buffer
which are satisfied from Where condition in Data base
query , and from buffer first record is fetched .
>>same as Answer 2
2) If you know all the primary keys in WHERE condition ,
use SELECT single.
If you dont know all primary kyes in WHERE condition , use
SELECT...UPTO
3)Performance:
SELECT UP TO...is gives better performace than select single
Is This Answer Correct ? | 11 Yes | 1 No |
Answer / guest
Use Select single if all the primary keys are provided else
use select up to 1 rows as that would be faster.I agree
with Aditya..
Is This Answer Correct ? | 8 Yes | 0 No |
Answer / s.k.
Hi All ,
Actually in Select single * only one record is fetched
which ever come across first in data base query , but for
statment select ..upto 1 row , all records are fetched into
a buffer which are satisfied from Where condition in Data
base query , and from buffer first record is fetched .
So Select Single * is better for performance.
Is This Answer Correct ? | 9 Yes | 5 No |
Answer / vijayaraghavan
Select Single * will pickup only one matching record from the database into the buffer, and returns the same to the internal table.
Select upto 1 rows will pickup all the records matching the condition into the buffer, but return the top record to the internal table.
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / vasu
i agree with aditya but if u know all primary key feilds in
that case only u go for select single *..other wise always
select up to n is the best..
Is This Answer Correct ? | 4 Yes | 1 No |
Answer / aditya
select single read db records with primary key.
select upto doesnt read for a primary key, instead it will
try to find the most suitable index.
hence select upto is faster than select single.
Is This Answer Correct ? | 3 Yes | 1 No |
Answer / stefan wagenblast
As looking on the performance analysis (ST05), both SELECTs
have the same estimated costs (I made a test). So because
estimated costs com from the database system, the same way
of searching in the table will be used --> no difference
which SELECT you use.
Is This Answer Correct ? | 1 Yes | 1 No |
Answer / laxmi_nv
Select .. Up to one row will have better performance than
the Select single *
Is This Answer Correct ? | 5 Yes | 9 No |
Answer / manoj kumar
select single * its complsary to use prmary key where as
selectup to one row there is no need of key and it will get
only one record where as in select single we will get
multiple record based on selection criteria
Is This Answer Correct ? | 0 Yes | 12 No |
Where the payroll results are stored
Where can you find error log for call transaction? : abap bdc
How to Search for User-exits for a particular Transaction?
Explain what are the different functions used in sap script? What are the parameters used in each function?
What is an Open Item in SAP? How will you find an Open Item in SAP?
visibility of a field string declared using tables statement? true/false.
What are logical data bases used in hr module? : abap hr
What are the different types of the sap abap data dictionary objects?
if data is inserted only using bdc open and bdc insert and not bdc close session funx module wat will happend? will data b inserted?
What are function modules?
How do you do BDC?
The standard symbols in SAP script are stored in which table?