09-10-2014 4:37 PM
Hi All,
Actually i need to improve one Report performence. SELECT SINGLE with out primary keys used in the report,While checking Runtime analysis for the Report,Only select single is taking more time.
Could you please tel me,If i replace select single with select upto 1 rows,it will improve performence or not.
Thanks so much.
09-10-2014 4:52 PM
Hi
I don't believe the performance can be improved by replacing SELECT SINGLE with UP TO 1 ROWS, the main problem could be the fields used in WHERE condition are not keys or are not in a index
Max
09-10-2014 5:03 PM
Hi Max,
Thanks Max for your reply.
yes select single used without primary keys.
but now i cant include the primary keys.. is there any other way to improve the performence without replacing with select upto 1 rows.
Thanks again.
09-10-2014 5:08 PM
If you need to get the data with a single selection, I believe it has to generate an index with the fields used in WHERE condition else
if it's possible you can try to get the primary key by a query in another tables linked with your table
Max
09-10-2014 5:11 PM
09-11-2014 9:37 AM
Hi Trinadh,
When no primary key is used, Secondary index has to be used.
Thanks,
Anil
09-11-2014 10:30 AM
HI Trinadh,
If you do not want to use primary key of the table either in fetching the data or in where condition.It's better to use select up to 1 rows or creating a secondary index based on your select statement.
In least case you can go with it.Just add the primary key in your where condition of select statement as below.
Note: Example Where vbeln like '%'.
09-11-2014 10:39 AM
Can you tell me how many times this statement is being executed? on which table and how many entries do you in this table?
Secondary key has to be created for this field in the table. Also please check how many secondary keys are available in that table
09-11-2014 5:55 PM
Thanks all.
my problem solved.
I have included primary keys by adding some logic.
but still my doubt is,if we are not able to use select single with all primary keys,we should create secondary indexes?
09-11-2014 6:00 PM
Yes. You should create secondary indexes for better performance if your where clause has non index keys.
Aslo if your table has less entries and you are using it multiple times, then better select all the entries place it in global table, sort on the filed for which u want to read and read it with binary search
09-12-2014 7:17 AM
Hi,
You may use Select... Upto 1 Row instead of the Select Single. if it is partial primary key.
If you want to avoid the End Select., then code it as follows
Select..
From...
Into ...
up to ...
Where ...
If your selection does not have any of the primary key ideally you have to create the Secondary index.
Regards
Muralee
09-12-2014 7:42 AM
Basically no much performance improvement is to be expected without either creation of new indexes or identification of other tables to execute intermediary JOIN as described in some OSS notes (Look with keywords "Performance" "Customer developments" for SD, MM/WM and PP/PM.
Regards,
Raymond