<?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 with mapping load? in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Performance-with-mapping-load/m-p/2085492#M89006</link>
    <description>&lt;P&gt;"&lt;SPAN&gt;I'm rather wondering why the mapping load is so slow"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;My guess if that it's not the "mapping" prefix that makes it slow, it's the unoptimized load. You could confirm this by removing "mapping" and adding "where 1" to the end. I would expect the load time to be closer to 19 seconds.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;"&lt;SPAN&gt;If it is faster to first load and then map, why doesn't QlikSense just do it that way in the first place? "&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;That's an interesting idea. I'm not aware of any optimizations that Qlik does like this -- but I'm not inside Qlik.&amp;nbsp; Such an optimization would silently double the memory requirement which might be confusing and have a negative impact.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Beyond a curiosity (a good find at that), I would guess the potential savings and risk would not justify implementing an optimization like this in the product.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you find that you are repeating this pattern a lot you could create a subroutine.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;-Rob&lt;BR /&gt;&lt;A href="http://www.easyqlik.com" target="_blank"&gt;http://www.easyqlik.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://masterssummit.com" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://qlikviewcookbook.com" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 19 Jun 2023 21:22:12 GMT</pubDate>
    <dc:creator>rwunderlich</dc:creator>
    <dc:date>2023-06-19T21:22:12Z</dc:date>
    <item>
      <title>Performance with mapping load?</title>
      <link>https://community.qlik.com/t5/App-Development/Performance-with-mapping-load/m-p/2085023#M88968</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a reason why mapping load is considerable slower than regular load?&lt;/P&gt;
&lt;P&gt;This started with me checking a mapping load between ID and string values of some type&lt;/P&gt;
&lt;P&gt;Mapping load with filter : &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;14 sec&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Lines fetched: 6 179
This took 13,999996357597 seconds &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Mapping load all (no where clause) : &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;21 sec&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Lines fetched: 9 015 353
This took 21,000038855709 seconds&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regular load : &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;4 sec&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Lines fetched: 9 015 353
This took 4,0000612847507 seconds &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;These numbers are consistent in my little test. So even if I only needed one type of values from this table it still is quicker for me to &lt;BR /&gt;- load all with regular load, &lt;BR /&gt;- do mapping load from resident table&lt;BR /&gt;- drop temporary table&lt;/P&gt;
&lt;P&gt;Mapping from regular load: &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;7sec&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Lines fetched: 6 179
This took 7,000041869469 seconds &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I really would appreciate if anyone can clarify for me why this happens. The way I read this it is actually more efficient to do load-map-drop than direct maping load. Why can't QlikSense just use this approach directly on the mapping load?&lt;/P&gt;</description>
      <pubDate>Sun, 18 Jun 2023 10:16:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Performance-with-mapping-load/m-p/2085023#M88968</guid>
      <dc:creator>oddgeir</dc:creator>
      <dc:date>2023-06-18T10:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: Performance with mapping load?</title>
      <link>https://community.qlik.com/t5/App-Development/Performance-with-mapping-load/m-p/2085176#M88978</link>
      <description>&lt;P&gt;Hi, Remember that Mapping loads from QVD files are NOT Optimized Loads. That could explain your difference? So for large mapping tables it can be faster sometimes to do an Optimized load first then do the mapping followed by a drop.&lt;/P&gt;
&lt;P&gt;Also good to remember: "where exists(field1)" do not break Optimized loads but "where exists(field1, field2) or Where field1 = field2" equivalent does.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2023 08:58:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Performance-with-mapping-load/m-p/2085176#M88978</guid>
      <dc:creator>jonashertz</dc:creator>
      <dc:date>2023-06-19T08:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: Performance with mapping load?</title>
      <link>https://community.qlik.com/t5/App-Development/Performance-with-mapping-load/m-p/2085373#M88997</link>
      <description>&lt;P&gt;Are you loading from a QVD? If you post your Where clause we may be able to offer some suggestions.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-Rob&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2023 14:45:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Performance-with-mapping-load/m-p/2085373#M88997</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2023-06-19T14:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: Performance with mapping load?</title>
      <link>https://community.qlik.com/t5/App-Development/Performance-with-mapping-load/m-p/2085442#M89003</link>
      <description>&lt;P&gt;Hi. Thanks for your responses.&amp;nbsp;&lt;BR /&gt;I understand that mapping load is not optimized, but I guess I had expected QlikSense native handling of mapping load at least had even performance to manually creating the temporary load table.&lt;/P&gt;
&lt;P&gt;As this was a pure difference between two load methods I didn't think my code was of any interest but here is the structure&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;TMPAllStringValues:
Mapping Load
		issue														
	,	stringvalue													
FROM [lib://customfieldvalue.qvd]
(qvd)
;

// =&amp;gt; 19 sec&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;While simply removing "mapping" from query and do mapping afterwards almost tripples the speed&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;TMPAllStringValues:
Load
		issue														
	,	stringvalue													
FROM [lib://customfieldvalue.qvd]
(qvd)
;

Issue2ExpType:
Mapping Load
		issue
	,	stringvalue
Resident TMPAllStringValues;

Drop table TMPAllStringValues;

// =&amp;gt;7 sec&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I'm not trying to argue that mapping load should be as fast as optimized load. I'm rather wondering why the mapping load is so slow that it should be made faster by each developer doing an extra step potentially for each mapping in a load script. If it is faster to first load and then map, why doesn't QlikSense just do it that way in the first place?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2023 17:28:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Performance-with-mapping-load/m-p/2085442#M89003</guid>
      <dc:creator>oddgeir</dc:creator>
      <dc:date>2023-06-19T17:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: Performance with mapping load?</title>
      <link>https://community.qlik.com/t5/App-Development/Performance-with-mapping-load/m-p/2085492#M89006</link>
      <description>&lt;P&gt;"&lt;SPAN&gt;I'm rather wondering why the mapping load is so slow"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;My guess if that it's not the "mapping" prefix that makes it slow, it's the unoptimized load. You could confirm this by removing "mapping" and adding "where 1" to the end. I would expect the load time to be closer to 19 seconds.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;"&lt;SPAN&gt;If it is faster to first load and then map, why doesn't QlikSense just do it that way in the first place? "&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;That's an interesting idea. I'm not aware of any optimizations that Qlik does like this -- but I'm not inside Qlik.&amp;nbsp; Such an optimization would silently double the memory requirement which might be confusing and have a negative impact.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Beyond a curiosity (a good find at that), I would guess the potential savings and risk would not justify implementing an optimization like this in the product.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you find that you are repeating this pattern a lot you could create a subroutine.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;-Rob&lt;BR /&gt;&lt;A href="http://www.easyqlik.com" target="_blank"&gt;http://www.easyqlik.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://masterssummit.com" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://qlikviewcookbook.com" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2023 21:22:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Performance-with-mapping-load/m-p/2085492#M89006</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2023-06-19T21:22:12Z</dc:date>
    </item>
  </channel>
</rss>

