Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Performance issue

Former Member
0 Kudos
137

Hi,

I have performance problen following code.It take more than 25 min to retrive data.Can help me to resolve it.

SELECT refbn rfbos rftyp gjahr wrttp stats twear yyaufnr hkont

lifnr SUM ( trbtr ) SUM ( fkbtr )

FROM fmioi INTO TABLE gt_fmioi

WHERE rldnr = gc_rldnr and

gjahr = pa_fyear and

fistl IN so_fctr and

fonds IN so_fund and

fipex IN so_comm and

fares = ' ' and

measure IN so_fprog and

wrttp IN (gc_wrttp_51,gc_wrttp_65) and

stats = gc_ststs and

fikrs = pa_area

GROUP BY refbn rfpos rftyp gjahr farea wrttp

stats twear yyaufnr hkont fikrs lifnr.

*I have maintain INDEX for follwing fields.*

rldnr = gc_rldnr value = '9A'

gjahr = pa_fyear value = 2007

fistl IN so_fctr and

fonds IN so_fund and

fipex IN so_comm and

fares = ' ' and

measure IN so_fprog and

wrttp IN (gc_wrttp_51,gc_wrttp_65) value = 51,65

stats = gc_ststs and

fikrs = pa_area value = 1000

Same thing happen for following code it take more than 25 min.

SELECT trbtr fkbtr wrttp hkont vogjahr voblnr kngjahr knbelnr knbuzei vrefbn vrfpo vrftyp FROM fmifiit

INTO TABLE gt_fmifiit

WHERE fikrs = '1000' and

rldnr = gc_rldnr and

gjahr = pa_fyear and

fistl IN so_fctr and

fonds IN so_fund and

fipex IN so_comm and

fares = ' ' and

measure IN so_fprog and

wrttp IN (gc_wrttp_54,gc_wrttp_61,gc_wrttp_66,gc_wrttp_57) and stats = gc_ststs and

I have maintain index which i have specified in where condition.

can u help to reduce the time.

Thanks,

Deesanth.

1 ACCEPTED SOLUTION

former_member251078
Participant
0 Kudos
57

Hello Deeshanth,

Could you please have a look into the following SAP Notes, see if it is applicable or not.

542484

859991

678397

1173259

396878

330101

515201

953893

Also as rob mentioned could be problem with the internal tables, where data is not populating and could be problem with the statistics of the table fmioi. So please check the statistics of this table and if needed update the statistics. You can also verify the selectivity of the fields of this table through DB05.Please send us the details of DB05 ouput of each fields of this table so that we can check it out.

Yours Sincerely

Dileep

4 REPLIES 4

Former Member
0 Kudos
57

hi,

use ST05 to find if the select is using the Index u expected. See the Explain function to get more information of the select.

Also check if the select-options that u r passing to the Select are not initial.

regards,

madhu

Former Member
0 Kudos
57

I've done these SELECTs many times without problem. Your problem is likely either that one or more of so_fctr, so_fund or so_comm is empty or that your database statistics are not up to date.

Rob

Former Member
0 Kudos
57

hi,

any summarization do with internal table. But dont do with select statement. Performance will increase.

regards

raghu

former_member251078
Participant
0 Kudos
58

Hello Deeshanth,

Could you please have a look into the following SAP Notes, see if it is applicable or not.

542484

859991

678397

1173259

396878

330101

515201

953893

Also as rob mentioned could be problem with the internal tables, where data is not populating and could be problem with the statistics of the table fmioi. So please check the statistics of this table and if needed update the statistics. You can also verify the selectivity of the fields of this table through DB05.Please send us the details of DB05 ouput of each fields of this table so that we can check it out.

Yours Sincerely

Dileep