Skip to Content
0
Former Member
Sep 07, 2012 at 10:52 AM

Performance issue in transaction MB51

123 Views

Hello All,

We've been facing performance issues in MB51 transaction.

We've discussed the issues in discussion post:

http://scn.sap.com/message/13162811#13162811

We've implemented whatever solution is discussed in the above post.

As per OSS Note - 1293807, we've created 2 indexes each on tables MSEG & MKPF.

Furthermore, we've also altered query as mentioned in the OSS note.

After implementing solution there are 2 scenarios:

  1. Performance improvement when executed with data from 2011
  2. Performance decrement when executed with data from 2012

We are providing the same data in both the cases. The difference being just the year in the date range.

When executed with data from 2011

Execution plan for the select query before the solution was implemented:

Execution plan for the select query after the solution was implemented:

In this case, this query is taking less time after the solution is applied.

In this case solution works well 😊

When executed with data from 2012

Execution plan for the select query before the solution was implemented:

Execution plan for the select query after the solution was implemented:

In this case the query after the solution is taking more time to execute than the query which was taking before the solution was implemented.

Our Analysis:

  1. For year 2011, select query was earlier executing based on index skip scan but now it is executing with the index created.
  2. for year 2012, select query was earlier executing first from table MKPF and then from MSEG. But after the solution was implemented the entry point has changed to MSEG then followed by MKPF.

Please provide a solution so that select query executes well in both cases.

Message was edited by: Prashant Gaur