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 |
With out any Write statement will the Top of the Page and End of Page trigger?
Why do we use logical blocks in abap program?
How would you design a BDC (session method ) in which session will get executed itself. user do not need to go to SM35.
What is meant by hide area?
What is human resource information systems (chris)? : sap abap hr
What are the different kinds of lock modes?
How do you set up background jobs in sap? What are the steps? What are the events driven batch jobs?
What is lock object ? : abap data dictionary
What are the basic functions of database utility?
How collect statement is different from append?
Functionality of Edit call..?
Is a logical database a requirement/must to write an ABAP query?