‎2007 Jan 17 4:19 AM
There a customized report to retreive from table coep
while the codes already uses index to retrieve... its still taking along time...
any suggestion/advice?
‎2007 Jan 17 4:23 AM
hi,
please send some description about the same like other tables used and the way data is being fectched etc...
Thanks
Shiva
‎2007 Jan 17 4:27 AM
SELECT * FROM coep INTO TABLE icoep
WHERE kokrs = cntarea
AND bukrs = bukrs
AND gjahr = year
AND versn = '000'
AND perio <= zperio
AND kstar BETWEEN cefr and ceto
and OBJNR between OBJFR AND objto
AND ( wrttp = '04' OR wrttp = '11' ).
‎2007 Jan 17 4:35 AM
1) first try to avoid select * ,if not all fields of table are required by you.
2) If not select * then write the fields in the order they appear in the table like -
select field1 field2 .......,the same applies to the where condition,means in the where condition use the fields in the order they appear in the database table like -
where field3 = 'abc' and field4 = 'xyz' and field5 = 'zzz'.
3) also firts go to se11 and give same selection criteria in the table Coep as u have given in the where condition in the program and see how many records did it fetched there.
‎2007 Jan 17 4:38 AM
Hi,
Remove select * and get only the fields which u r in need and also place the fileds in order they being placed in table
KOKRS
BELNR
BUZEI
and also use maximum no of condition comparision in the where condition
Thanks
Shiva
‎2007 Jan 17 3:39 PM
I think the problem is that you are trying to select too much data. Try to reduce the number of entries in "BETWEEN cefr and ceto" and "OBJNR between OBJFR AND objto"
Rob