Skip to Content
author's profile photo Former Member
Former Member

Performance issue

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.

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 11, 2008 at 04:52 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 08, 2008 at 06:12 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 08, 2008 at 01:23 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 09, 2008 at 07:12 AM

    hi,

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

    regards

    raghu

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.