05-09-2008 1:46 PM
Dear Frds,
The program performance is getting degraded because of the below select statement which fetches the OBJECTID from CDHDR table for the given period and the T code VA02.
select objectid
from cdhdr
into table gt_itab
where objectclas in lr_objectclas
and objectid in lr_objectid
and changenr in lr_changenr
and username in lr_user
and udate in s_date
and utime in lr_utime
and tcode = 'VA02'.
we have tried with the primary key sequence and also by selecting the distinct data. Still it is taking more time.
Please do needful to tune this for better performance.
Regards,
Sailaja.
05-09-2008 2:12 PM
hi,
did u run this through st05? and are all the values are passed to all the fields in where condition ??? if yes, then imporvement on this select is difficult.
regards,
madhumitha
05-09-2008 3:33 PM
Please check SQL trace:
/people/siegfried.boes/blog/2007/09/05/the-sql-trace-st05-150-quick-and-easy
The order of the fields in the where condition is nearyl irrelevant, it is important which inclause are filled
see details in SQL Trace.
Check Explain for this statement to see what index is taken, is it the primary key?
Otherwise come back with duration, executions and records for this select.
Siegfried
05-09-2008 5:45 PM
Hi,
replace your where condition by:
OBJECTCLASS = VERKBELEG
OBJECTID = order number.
regrads,
Fernando
05-10-2008 2:43 AM
Hi Reddy!!
Try writing only those fields that u want to put ur conditions on in where condition.
Also are u using ranges that u have used "in" in where condition.
Try "=" option..
Also c to it that u dnt use select query widin loop-endloop.This also degrades the performence....
select * single objectid
from cdhdr
into table gt_itab
where objectclas = lr_objectclas
and tcode = 'VA02'.
Reward if useful.