<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Performance issue in transaction MB51 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-transaction-mb51/m-p/9002960#M1698039</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Yuri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In both the cases, the same select statement is getting executed. &lt;/P&gt;&lt;P&gt;Yeah some of the ranges provided to the select statement are empty.&lt;/P&gt;&lt;P&gt;But its same in both the cases so shouldn't query behave in the same way in both the cases?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Sep 2012 06:15:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-09-11T06:15:42Z</dc:date>
    <item>
      <title>Performance issue in transaction MB51</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-transaction-mb51/m-p/9002952#M1698031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We've been facing performance issues in MB51 transaction.&lt;/P&gt;&lt;P&gt;We've discussed the issues in discussion post:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://answers.sap.com/message/13162811#13162811"&gt;http://scn.sap.com/message/13162811#13162811&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; We've implemented whatever solution is discussed in the above post.&lt;/P&gt;&lt;P&gt;As per OSS Note - &lt;STRONG&gt;1293807&lt;/STRONG&gt;, we've created 2 indexes each on tables MSEG &amp;amp; MKPF.&lt;/P&gt;&lt;P&gt;Furthermore, we've also altered query as mentioned in the OSS note.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After implementing solution there are 2 scenarios:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Performance improvement when executed with data from 2011&lt;/LI&gt;&lt;LI&gt;Performance decrement when executed with data from 2012&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are providing the same data in both the cases. The difference being just the year in the date range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;When executed with data from 2011&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Execution plan for the select query before the solution was implemented:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;IMG class="jiveImage" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/135791" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Execution plan for the select query after the solution was implemented:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/135787" /&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;IMG class="jiveImage" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case, this query is taking less time after the solution is applied.&lt;/P&gt;&lt;P&gt;In this case solution works well &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/952/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;When executed with data from 2012&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Execution plan for the select query before the solution was implemented:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;IMG class="jiveImage" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/135792" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Execution plan for the select query after the solution was implemented:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/135786" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Our Analysis:&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;For year 2011, select query was earlier executing based on &lt;STRONG&gt;index skip scan &lt;/STRONG&gt;but now it is executing with the index created.&lt;/LI&gt;&lt;LI&gt;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.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Please provide a solution so that select query executes well in both cases.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Prashant Gaur&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2012 10:52:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-transaction-mb51/m-p/9002952#M1698031</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-09-07T10:52:13Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue in transaction MB51</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-transaction-mb51/m-p/9002953#M1698032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what fields did you put into the new Z51 indexes on both tables?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since the DB behaves different when executing with different values, it obviously uses histograms.&lt;/P&gt;&lt;P&gt;Have you tried without histograms before? What was different?&lt;/P&gt;&lt;P&gt;What percentage of data did you select for calculating statistics?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since collecting stats with a high percentage is expensive, you might like to export your currently active statistics for the tables first, so that you can revert quickly (Seconds) instead of re-calculating (Hours ?) (Exporting stats can be done with brtools).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In addition, you should get both statements as executed against the DB so that you can compare plans in ST05 without need to execute the query.&lt;/P&gt;&lt;P&gt;You could try to hint the statement, that is performing bad to be like the one that is ok.&lt;/P&gt;&lt;P&gt;I would start with&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;leading(T_xx) index(T_xx,"MSEG~Z51")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;xx beinig the alias of that MSEG that is used by the plan to start with (not visible in screenshot).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Volker&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Sep 2012 06:47:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-transaction-mb51/m-p/9002953#M1698032</guid>
      <dc:creator>volker_borowski2</dc:creator>
      <dc:date>2012-09-08T06:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue in transaction MB51</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-transaction-mb51/m-p/9002954#M1698033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Volker,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have created 2 indexes on MSEG and 2 on MKPF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MKPF:&lt;/P&gt;&lt;P&gt;Z51: MANDT, MBLNR, MJAHR, BUDAT&lt;/P&gt;&lt;P&gt;Z52: MANDT, BUDAT, MBLNR, MJAHR, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MSEG:&lt;/P&gt;&lt;P&gt;Z51: MANDT, WERKS, Plant, LGORT, MBLNR, MJAHR, ZEILE.&lt;/P&gt;&lt;P&gt;Z52: MANDT, MBLNR, MJAHR, WERKS, LGORT, ZEILE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to try without histograms? Do you mean without providing hints to the select statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Is there any standard documentation provided by SAP on the oracle database?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2012 05:57:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-transaction-mb51/m-p/9002954#M1698033</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-09-10T05:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue in transaction MB51</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-transaction-mb51/m-p/9002955#M1698034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Prashant,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I strongly recommend you SAP note 1550000. This is a stable and long-term solution for MB51 performance problems. Invested time definitely worth it.&lt;/P&gt;&lt;P&gt;With one of our top customers implementation of this note resulted in performance improvement of up to factor 1000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yuri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2012 07:35:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-transaction-mb51/m-p/9002955#M1698034</guid>
      <dc:creator>yuri_ziryukin</dc:creator>
      <dc:date>2012-09-10T07:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue in transaction MB51</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-transaction-mb51/m-p/9002956#M1698035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Yuri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;Considering that this would be a huge DDIC change. It would take some efforts to convince the client to implement this solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had a question, suppose if there is a join on table A and table B. Then what determines that which database table would be accessed first and why is it so?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2012 08:52:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-transaction-mb51/m-p/9002956#M1698035</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-09-10T08:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue in transaction MB51</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-transaction-mb51/m-p/9002957#M1698036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;Volker Borowski wrote:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what fields did you put into the new Z51 indexes on both tables?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since the DB behaves different when executing with different values, it obviously uses histograms.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Volker&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Btw, Volker. In order to use histograms, special DBI hints should be passed from ABAP code to ensure that DBI is sending values of bind variables to DB. This will not happen automatically. I really doubt that this statement is provided with SUBSTITUTE_VALUES or SUBSTITUTE_LITERALS hint in ABAP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2012 12:59:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-transaction-mb51/m-p/9002957#M1698036</guid>
      <dc:creator>yuri_ziryukin</dc:creator>
      <dc:date>2012-09-10T12:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue in transaction MB51</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-transaction-mb51/m-p/9002958#M1698037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Prashant,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;nevertheless this is an official SAP solution and the customer will be protected by SAP support in case any problems arise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding your question: Database itself decides what execution plan to use in a particular case. In Oracle, for example, it is normally based on statistics (collected from tables and indexes) which describe the number of distinct values for the fields, sizes in blocks, etc. Actually it is very unlikely that one statement gets different execution plans depending on input data. That may happen if some of the ranges in ABAP select statements are empty or not empty.&lt;/P&gt;&lt;P&gt;In your case we definitely need to see the statement itself in both cases.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yuri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2012 13:07:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-transaction-mb51/m-p/9002958#M1698037</guid>
      <dc:creator>yuri_ziryukin</dc:creator>
      <dc:date>2012-09-10T13:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue in transaction MB51</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-transaction-mb51/m-p/9002959#M1698038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Juri, &lt;/P&gt;&lt;P&gt;I am aware of this, and I was only concluding this because of the statement given in the linked thread in the opening posting and the fact, that for both years it starts the same way with MSEG for 2011 and 2012, but decides for a nested loop in 2011 and for a hash join in 2012, which should surely have less data than 2011 in average.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the optimizer decides different, depending on data of the where clause.&lt;/P&gt;&lt;P&gt;I can only think about histograms doing so...&lt;/P&gt;&lt;P&gt;And with Oracle 11, bind_peeking changed a bit, need to dig documentation for details on this ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prashant, can you check the Oracle Parameters related to this?&lt;/P&gt;&lt;P&gt;show parameter peek&lt;/P&gt;&lt;P&gt;show parameter bind&lt;/P&gt;&lt;P&gt;should give the related information&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Volker&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2012 18:59:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-transaction-mb51/m-p/9002959#M1698038</guid>
      <dc:creator>volker_borowski2</dc:creator>
      <dc:date>2012-09-10T18:59:51Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue in transaction MB51</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-transaction-mb51/m-p/9002960#M1698039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Yuri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In both the cases, the same select statement is getting executed. &lt;/P&gt;&lt;P&gt;Yeah some of the ranges provided to the select statement are empty.&lt;/P&gt;&lt;P&gt;But its same in both the cases so shouldn't query behave in the same way in both the cases?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Sep 2012 06:15:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-transaction-mb51/m-p/9002960#M1698039</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-09-11T06:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue in transaction MB51</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-transaction-mb51/m-p/9002961#M1698040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Yuri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes hints are explicitly sent to the database from the select query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select query statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;select (g_t_fields1)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;into &lt;/SPAN&gt;corresponding &lt;SPAN class="L0S52"&gt;fields &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;of &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;table &lt;/SPAN&gt;itab&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;from &lt;/SPAN&gt;( ( (&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mkpf &lt;SPAN class="L0S52"&gt;as &lt;/SPAN&gt;ki inner &lt;SPAN class="L0S52"&gt;join&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mseg &lt;SPAN class="L0S52"&gt;as &lt;/SPAN&gt;si &lt;SPAN class="L0S52"&gt;on&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ki~mandt = si~mandt &lt;SPAN class="L0S52"&gt;and&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ki~mblnr = si~mblnr &lt;SPAN class="L0S52"&gt;and&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ki~mjahr = si~mjahr ) inner &lt;SPAN class="L0S52"&gt;join&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mkpf &lt;SPAN class="L0S52"&gt;as &lt;/SPAN&gt;kt &lt;SPAN class="L0S52"&gt;on&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ki~mandt = kt~mandt &lt;SPAN class="L0S52"&gt;and&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ki~mblnr = kt~mblnr &lt;SPAN class="L0S52"&gt;and&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ki~mjahr = kt~mjahr ) inner &lt;SPAN class="L0S52"&gt;join&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mseg &lt;SPAN class="L0S52"&gt;as &lt;/SPAN&gt;st &lt;SPAN class="L0S52"&gt;on&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; si~mandt = st~mandt &lt;SPAN class="L0S52"&gt;and&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; si~mblnr = st~mblnr &lt;SPAN class="L0S52"&gt;and&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; si~mjahr = st~mjahr &lt;SPAN class="L0S52"&gt;and&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; si~zeile = st~zeile )&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;where&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ki~budat &lt;SPAN class="L0S52"&gt;in &lt;/SPAN&gt;BUDAT&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;and &lt;/SPAN&gt;si~bwart &lt;SPAN class="L0S52"&gt;in &lt;/SPAN&gt;bwart&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;and &lt;/SPAN&gt;si~CHARG &lt;SPAN class="L0S52"&gt;in &lt;/SPAN&gt;CHARG&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;and &lt;/SPAN&gt;si~KUNNR &lt;SPAN class="L0S52"&gt;in &lt;/SPAN&gt;KUNNR&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;and &lt;/SPAN&gt;si~LGORT &lt;SPAN class="L0S52"&gt;in &lt;/SPAN&gt;LGORT&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;and &lt;/SPAN&gt;si~LIFNR &lt;SPAN class="L0S52"&gt;in &lt;/SPAN&gt;LIFNR&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;and &lt;/SPAN&gt;si~MATNR &lt;SPAN class="L0S52"&gt;in &lt;/SPAN&gt;MATNR&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;and &lt;/SPAN&gt;si~OID_EXTBOL &lt;SPAN class="L0S52"&gt;in &lt;/SPAN&gt;OID_EXTB&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;and &lt;/SPAN&gt;si~OID_MISCDL &lt;SPAN class="L0S52"&gt;in &lt;/SPAN&gt;OID_MISC&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;and &lt;/SPAN&gt;si~SOBKZ &lt;SPAN class="L0S52"&gt;in &lt;/SPAN&gt;SOBKZ&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;and &lt;/SPAN&gt;ki~USNAM &lt;SPAN class="L0S52"&gt;in &lt;/SPAN&gt;USNAM&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;and &lt;/SPAN&gt;ki~VGART &lt;SPAN class="L0S52"&gt;in &lt;/SPAN&gt;VGART&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;and &lt;/SPAN&gt;si~WERKS &lt;SPAN class="L0S52"&gt;in &lt;/SPAN&gt;WERKS&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;and &lt;/SPAN&gt;ki~XBLNR &lt;SPAN class="L0S52"&gt;in &lt;/SPAN&gt;XBLNR&lt;BR /&gt;&lt;STRONG&gt; %_HINTS&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; ORACLE &lt;SPAN class="L0S33"&gt;'&amp;amp;SUBSTITUTE VALUES&amp;amp;'&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;BR /&gt; .&lt;BR /&gt;&amp;nbsp;&amp;nbsp; endif.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Sep 2012 06:17:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-transaction-mb51/m-p/9002961#M1698040</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-09-11T06:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue in transaction MB51</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-transaction-mb51/m-p/9002962#M1698041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Volker,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do we check these parameters?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Sep 2012 10:25:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-transaction-mb51/m-p/9002962#M1698041</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-09-11T10:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue in transaction MB51</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-transaction-mb51/m-p/9002963#M1698042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, here is the answer. Then because of histograms Oracle decides to use different execution plans for the same statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Sep 2012 14:34:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-transaction-mb51/m-p/9002963#M1698042</guid>
      <dc:creator>yuri_ziryukin</dc:creator>
      <dc:date>2012-09-11T14:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue in transaction MB51</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-transaction-mb51/m-p/9002964#M1698043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __jive_emoticon_name="laugh" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/952/images/emoticons/laugh.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How is the execution plan in both cases, if you do not supply the Hint ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;( Parameter stuff no more relevant: As Yuri explained histgrams are used ...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tipp for operatin the SQL-Trace stuff. Always make copys of the entire Screen in Textmode, to be able to re-calculate in ST05 later. You can do a List save (T-code "%PC") to clipboard&amp;nbsp; and drop it to a plain text file. This way I like to work most of the times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Volker&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Volker Borowski&#xD;
&#xD;
If you are convinced that a specific plan is better, you can also try to HINT the execution,&#xD;
either by using USE_NL(t1 t2) or by using NO_USE_HASH...&#xD;
Might require a bit google search on Oracle Hints, &#xD;
or you need to provide us the Statement as sent to the DB because we will need to know the name of the generated table aliases.&#xD;
&#xD;
V.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Sep 2012 19:23:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-transaction-mb51/m-p/9002964#M1698043</guid>
      <dc:creator>volker_borowski2</dc:creator>
      <dc:date>2012-09-11T19:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue in transaction MB51</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-transaction-mb51/m-p/9002965#M1698044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Volker,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have created an OSS message with SAP to further investigate the issue &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1011/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks for all your support.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2012 07:10:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-transaction-mb51/m-p/9002965#M1698044</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-09-24T07:10:07Z</dc:date>
    </item>
  </channel>
</rss>

