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 |
I have 2 transactions,the output of 1st transaction is input of 2nd transaction.In this senario...Which method we use to upload the Data,Call trans or Session maethod?How?
What are the domains and data element?
can any post me all steps in MM ,SD, PP FLOW in detail?
what are the two types of request available in CTS?
what is abstract classes
How do you read a LOCAL Sequentional file
Explain what are extracts?
What are the ways you can do the tuning?
A Job is scheduled with Three steps. In the event the second step fails..what happens to the first and third step of the Job chain?
How is the command suppress-dialog useful?
Suppose we are transfer data through BDC from legacy to SAP and their is some duplicate data in legacy system but we don’t want this in SAP system .So how can we check that this data is already exist ?
how to modify a a paritcular field value of BDC table ? suppose im filling company code in of of the screens.Now i want to use the same BDC table with just compant code different.