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 |
Modes in Call Transaction?
Does every abap/4 have a modular structure?
requirement is to create a badi for xd02 initial screen .how to search foe it.
For what purpose Chain Endchain statement is used?
3) Will 50,000 records be uploaded directly into APP's Server?
What is sap abap data dictionary?
which select statement is used in script?
difference between TYPE and LIKE ?
Give few names of cluster tables in sap? Give few names of pooled tables in sap? give few names of transparent tables?
Define external layer?
most commonly used command in Interactive Reporting?
Which of the following assigns work to the application server? Options ::Dispatcher, work process, roll area