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: 

Select single to RSEG with very low performance

Former Member
0 Kudos

Hello experts,

We have recently upgraded our sap basis from 701 to 740 and we are experiencing a very low performance with the following abap instruction:

select single * from rseg into lw_rseg where ebeln = lw_output-pedido and

                                                            ebelp = lw_output-item and

                                                            kschl = lw_output-kschl.

Could it be anything from the upgrade?

Any suggestions?

If we change the "*" for only one field of the RSEG table, would the improvement in te performance be significant?

Thank you.

Best regards,

Raquel Oliveira

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor
0 Kudos

Read first 191492 - Performance: Customer developments in MM/WM, look for RSEG.

Regards,

Raymond

4 REPLIES 4

nikolayevstigneev
Contributor
0 Kudos

Hi, Raquel!

In SELECT statement you are not using the key fields for RSEG table.

Replacing "*" by a single field won't do the trick.

In our system we've got a table index on EBELN and EBELP fields in RSEG and it helps a lot.

In case you don't want to set additional indexes you can find all incoming invoices for the purchasing document items in EKBE table and then go to RSEG having BELNR, GJAHR and BUZEI fields.

If you already have table index on RSEG with EBELN & EBELP fields - you can trace SQL statement in ST05 and check whether it uses the index.

And apart from that - anything can be from upgrade

0 Kudos

Hello Nikolay,

Thank you for your answer. I will try to implement your suggestion and let you know the result.

The SAP Note that Raymond refers also suggest the solution you mentioned.

Thank you.

Best regards,

0 Kudos

Hi, Raquel!

Just re-read my post and I'd like to add in order not to be misunderstood: in most cases it'll be enough for you to make a pre-select from EKBE table. Creating table indexes "because I want it now" should be discouraged.

P.S. Raymond found a good example of using EKBE table.

P.P.S. In case you still have troubles use ST05 SQL trace and make sure that index statistics is collected in your system (DB13).

raymond_giuseppi
Active Contributor
0 Kudos

Read first 191492 - Performance: Customer developments in MM/WM, look for RSEG.

Regards,

Raymond