<?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: How to debug Qlik Sense script huge memory consumption? in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-debug-Qlik-Sense-script-huge-memory-consumption/m-p/1281255#M2624</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks like all 5 fields in your &lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;AggregatedFact&lt;/SPAN&gt; table are also in your &lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;FactCSV&lt;/SPAN&gt; table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So this will be attempting to generate a 5 field synthetic key, which depending on your actual data could end up being huge, gobble up your RAM and take ages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe change your &lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;AggregatedFact&lt;/SPAN&gt; load to something like this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;AggregatedFact:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; StoreId,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GoodsId as AGGR&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;GoodsId &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RegionSomeMappedID as AGGR&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;RegionSomeMappedID &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum(SellingSum) as AGGRSellingSum,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum(PurchaseSum) as AGGRPurchaseSum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;RESIDENT FactCSV&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;GROUP BY StoreId, GoodsId, RegionSomeMappedID;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even if this loads in a reasonable time I doubt it will be your end game, as the only association between the tables will be on &lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;StoreId&lt;/SPAN&gt;.&amp;nbsp; I expect you may need a composite key to associate your 2 tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or maybe if you only need the aggregations you could simply drop the &lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;FactCSV&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; &lt;/SPAN&gt;table at the end.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Feb 2017 18:02:31 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-02-15T18:02:31Z</dc:date>
    <item>
      <title>How to debug Qlik Sense script huge memory consumption?</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-debug-Qlik-Sense-script-huge-memory-consumption/m-p/1281254#M2623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have huge fact table 300M rows and one small mapping table 50K rows, both in CSV. Simple scenario - I need map RegionID from map table, and aggregate fact data by grouping three fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I ran script below on&lt;STRONG&gt; Qlik Sence Server (192 GB RAM; 12 cores)&lt;/STRONG&gt;. Script used up ALL memory (for process Engine.exe), started to use swap file extensively, and after 4.5 hours (!!!) was terminated by me because I've lost my temper.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While waiting I uploaded the same tables on &lt;STRONG&gt;SQL Server 2016 (32 Gb RAM; 4 cores with lower frequency)&lt;/STRONG&gt;, build 3 indexes (1 hour) and run simple query JOIN fact on map_table and then GROUP BY (50 min).&lt;/P&gt;&lt;P&gt;Total executioin time: 1h 50min&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Whats wrong with you, Qlik ? &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/angry.png" /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;More seriosly: &lt;/P&gt;&lt;P&gt;Any directions how to debug this issue?&lt;/P&gt;&lt;P&gt;I did simple ApplyMap and GROUP BY, why in hell it ate so much memory?&lt;/P&gt;&lt;P&gt;Maybe I just should NOT use Qlik for ETL tasks when having SQL Server?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;EM&gt;My script here:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FactCSV:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @1 AS StoreId,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @2 AS GoodsId,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @3 AS SellingSum,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @4 AS PurchaseSum&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ApplyMap('Map_RegionID', @5) AS RegionSomeMappedID // Map_RegionID above loaded as Mapping table (id, RegionSomeMappedID)&lt;/P&gt;&lt;P&gt;FROM [lib://fact.csv]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AggregatedFact:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; StoreId, GoodsId, RegionSomeMappedID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum(SellingSum) as SellingSum, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum(PurchaseSum) as PurchaseSum&lt;/P&gt;&lt;P&gt;RESIDENT FactCSV&lt;/P&gt;&lt;P&gt;GROUP BY StoreId, GoodsId, RegionSomeMappedID;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Feb 2017 16:42:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-debug-Qlik-Sense-script-huge-memory-consumption/m-p/1281254#M2623</guid>
      <dc:creator />
      <dc:date>2017-02-15T16:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to debug Qlik Sense script huge memory consumption?</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-debug-Qlik-Sense-script-huge-memory-consumption/m-p/1281255#M2624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks like all 5 fields in your &lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;AggregatedFact&lt;/SPAN&gt; table are also in your &lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;FactCSV&lt;/SPAN&gt; table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So this will be attempting to generate a 5 field synthetic key, which depending on your actual data could end up being huge, gobble up your RAM and take ages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe change your &lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;AggregatedFact&lt;/SPAN&gt; load to something like this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;AggregatedFact:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; StoreId,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GoodsId as AGGR&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;GoodsId &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RegionSomeMappedID as AGGR&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;RegionSomeMappedID &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum(SellingSum) as AGGRSellingSum,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum(PurchaseSum) as AGGRPurchaseSum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;RESIDENT FactCSV&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;GROUP BY StoreId, GoodsId, RegionSomeMappedID;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even if this loads in a reasonable time I doubt it will be your end game, as the only association between the tables will be on &lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;StoreId&lt;/SPAN&gt;.&amp;nbsp; I expect you may need a composite key to associate your 2 tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or maybe if you only need the aggregations you could simply drop the &lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;FactCSV&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; &lt;/SPAN&gt;table at the end.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Feb 2017 18:02:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-debug-Qlik-Sense-script-huge-memory-consumption/m-p/1281255#M2624</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-15T18:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to debug Qlik Sense script huge memory consumption?</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-debug-Qlik-Sense-script-huge-memory-consumption/m-p/1281256#M2625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, Bill. &lt;/P&gt;&lt;P&gt;Your point was right. Now aggregation time is on par with SQL Server. &lt;/P&gt;&lt;P&gt;One more thing is bothering me... My SQL server runs on much worse hardware than Qlik, but the aggreration time is on par. Does &lt;SPAN style="font-size: 13.3333px;"&gt;Qlik use parallelization on these tasks? &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2017 08:45:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-debug-Qlik-Sense-script-huge-memory-consumption/m-p/1281256#M2625</guid>
      <dc:creator />
      <dc:date>2017-02-17T08:45:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to debug Qlik Sense script huge memory consumption?</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-debug-Qlik-Sense-script-huge-memory-consumption/m-p/1281257#M2626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yup, in Qlik script a Group By will run single threaded.&amp;nbsp; Whereas an RDBMS would often multithread it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Group By aggregations will always be heavy on machine resources be it Qlik or database and one has to make a considered choice of which machines' resources to hammer.&amp;nbsp; If it is a Production database then taking load off it can often be preferred as otherwise End User OLTP performance can suffer, plus if you have RDBMS licensing per core the financial difference can be huge.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some years back I gave a presentation to the board and said I estimated offloading such workload from the Oracle database servers to the Qlik server would save them approx GBP 5 million over five years.&amp;nbsp; Which was quite a claim that the CFO picked up on and asked the CIO what he thought of this claim.&amp;nbsp; The CIO responded that it was probably in the right order of magnitude.&amp;nbsp; The board approved the Qlik project and have not regretted the decision.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notwithstanding that one of the strengths of Qlik only becomes apparent when data is loaded at the transactional level and not pre-aggregated, as then the End Users in the dashboards can dynamically slice 'n dice and select dimensions interactively in ways that quite likely would never have been thought off whilst specifying what aggregations are needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doing this with 300 million fact rows would need a well designed and tuned data model &amp;amp; front end GUI.&amp;nbsp; But I have a Qlik app with over a billion fact rows and it performs adequately and the End Users love it.&amp;nbsp; It does have a fair stash of RAM and processor cores for Qlik though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2017 10:31:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-debug-Qlik-Sense-script-huge-memory-consumption/m-p/1281257#M2626</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-17T10:31:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to debug Qlik Sense script huge memory consumption?</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-debug-Qlik-Sense-script-huge-memory-consumption/m-p/1281258#M2627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Bill for your answer, really helpful!&lt;/P&gt;&lt;P&gt;Money always matter)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;My real problem is that underlying transactions fact table is way bigger than 300M rows, actuallly it's just a &lt;EM&gt;monthly&lt;/EM&gt; &lt;EM&gt;increment&lt;/EM&gt;. I have serious doubts that raw transactions should be put in the Qlik even for one year in this case. Memory amount needed for such cluster will be very expensive. Hense, &lt;STRONG&gt;I have to&lt;/STRONG&gt; aggregate the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Ok, Group By will run single threaded. What about the formulas in measure calculations when user makes a request in app? Are they run single or multi threaded?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2017 10:49:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-debug-Qlik-Sense-script-huge-memory-consumption/m-p/1281258#M2627</guid>
      <dc:creator />
      <dc:date>2017-02-17T10:49:36Z</dc:date>
    </item>
  </channel>
</rss>

