<?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>Question Re: Memory allocation in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/memory-allocation/qaa-p/12353400#M4626164</link>
    <description>&lt;P&gt;For test purposes you can add the statement "SEQUENTIAL EXECUTION" to your procedure definition (check the docu &lt;A href="https://help.sap.com/viewer/de2486ee947e43e684d39702027f8a94/2.0.05/en-US/7a2da744ce544db1814a5fff250e99f6.html" target="_blank"&gt;here&lt;/A&gt;). With that you can verify if the OOM dump occurs, because of parallel execution and resulting increased memory load.&lt;/P&gt;&lt;P&gt;If the procedure is not time critical you probably can use the statement for production execution; but I would recommend to analyze your OOM dump in detail, create an execution plan and a PlanViz analysis to get an overview about the execution and memory consumption blocks. Based on the analysis you potentially see points to improve.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Dec 2020 08:34:07 GMT</pubDate>
    <dc:creator>pfefferf</dc:creator>
    <dc:date>2020-12-28T08:34:07Z</dc:date>
    <item>
      <title>Memory allocation</title>
      <link>https://community.sap.com/t5/technology-q-a/memory-allocation/qaq-p/12353399</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
  &lt;P&gt;In my system i have the limit of memory set as 150GB.&lt;/P&gt;
  &lt;P&gt;There is an procedure that actually returns error due to not being able to allocate enough memory.&lt;/P&gt;
  &lt;P&gt;I've found that if i ran this procedure in a debug mode then everything works fine, but when I try to run it as a standard procedure or function (for MAP_REDUCE) then I'm getting those errors, the same thing happens when I ran it as an anonymous block - if it's ran in debug mode then everything is fine, otherwise not.&lt;/P&gt;
  &lt;P&gt;As my understanding goes that can be caused by a parallel execution if there is an assignment, e.g. &lt;A href="https://developers.sap.com/tutorials/xsa-sqlscript-parallel.html"&gt;https://developers.sap.com/tutorials/xsa-sqlscript-parallel.html&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;short example:&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;lt_test = SELECT * FROM test_table;


lt_query2 = SELECT * FROM test_query q
JOIN :lt_test t 
ON t.id = q.id;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;I'd like to ask if anyone could confirm that and it is caused because in debug mode it's ran in steps, where in normal mode it's ran in parallel.&lt;/P&gt;
  &lt;P&gt;Is there anything I can do with it?&lt;/P&gt;
  &lt;P&gt;BR,&lt;/P&gt;
  &lt;P&gt;M&lt;/P&gt;</description>
      <pubDate>Mon, 28 Dec 2020 08:10:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/memory-allocation/qaq-p/12353399</guid>
      <dc:creator>matma24</dc:creator>
      <dc:date>2020-12-28T08:10:14Z</dc:date>
    </item>
    <item>
      <title>Re: Memory allocation</title>
      <link>https://community.sap.com/t5/technology-q-a/memory-allocation/qaa-p/12353400#M4626164</link>
      <description>&lt;P&gt;For test purposes you can add the statement "SEQUENTIAL EXECUTION" to your procedure definition (check the docu &lt;A href="https://help.sap.com/viewer/de2486ee947e43e684d39702027f8a94/2.0.05/en-US/7a2da744ce544db1814a5fff250e99f6.html" target="_blank"&gt;here&lt;/A&gt;). With that you can verify if the OOM dump occurs, because of parallel execution and resulting increased memory load.&lt;/P&gt;&lt;P&gt;If the procedure is not time critical you probably can use the statement for production execution; but I would recommend to analyze your OOM dump in detail, create an execution plan and a PlanViz analysis to get an overview about the execution and memory consumption blocks. Based on the analysis you potentially see points to improve.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Dec 2020 08:34:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/memory-allocation/qaa-p/12353400#M4626164</guid>
      <dc:creator>pfefferf</dc:creator>
      <dc:date>2020-12-28T08:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: Memory allocation</title>
      <link>https://community.sap.com/t5/technology-q-a/memory-allocation/qaa-p/12353401#M4626165</link>
      <description>&lt;P&gt;You are right - everything seems to be working just fine after adding "SEQUENTIAL EXECUTION", before 150GB was not enough, now it's taking less than 65.&lt;/P&gt;&lt;P&gt;Shouldn't it be marked in the documentation that "PARALLEL EXECUTION" is the default mode and if nothing will be specified it will be used?&lt;/P&gt;&lt;P&gt;Nevertheless I'm taking your answer because everything seems to be working. Thank you a lot!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Dec 2020 08:43:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/memory-allocation/qaa-p/12353401#M4626165</guid>
      <dc:creator>matma24</dc:creator>
      <dc:date>2020-12-28T08:43:12Z</dc:date>
    </item>
  </channel>
</rss>

