<?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 Hierarchy and memory in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Hierarchy-and-memory/m-p/223645#M76144</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok // i have loaded only the fields nodeid, parentid en nodename .. loading is no problem .. the pivot is the problem&lt;/P&gt;&lt;P&gt;in one sheet i have a list of all nodeids .. and in sheet 2 the pivot .. i qlik a nodeid and then switch to sheet 2 to see the pivot chart with all the related node-ids&lt;/P&gt;&lt;P&gt;any comments?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Jan 2010 17:19:20 GMT</pubDate>
    <dc:creator>amien</dc:creator>
    <dc:date>2010-01-29T17:19:20Z</dc:date>
    <item>
      <title>Hierarchy and memory</title>
      <link>https://community.qlik.com/t5/QlikView/Hierarchy-and-memory/m-p/223636#M76135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm loading 2.3mil records with a 4GB 32bit version. each record contains a Node and Parent .. But i get a out of memory error .. i'v checked if any node is the same as the parent .. or if a parent of the partent points to the node. What can i do to optimize this? should i make a CTE in SQL? of is this just not possible in QV 4GB/32bit?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;[Adjacent Nodes]:&lt;BR /&gt;LOAD NodeID, NodeName, NodeLocation, ParentID, ParentName;&lt;BR /&gt;SQL SELECT *&lt;BR /&gt;FROM TABLE;&lt;BR /&gt;&lt;BR /&gt;[Hierarchy]:&lt;BR /&gt;HIERARCHY (NodeID,ParentID,L,ParentName,NodeID,Path)&lt;BR /&gt;LOAD&lt;BR /&gt; NodeID&lt;BR /&gt;,ParentID&lt;BR /&gt;,NodeName as L&lt;BR /&gt;,NodeID as PathSource&lt;BR /&gt;RESIDENT [Adjacent Nodes]&lt;BR /&gt;;&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jan 2010 22:51:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hierarchy-and-memory/m-p/223636#M76135</guid>
      <dc:creator>amien</dc:creator>
      <dc:date>2010-01-26T22:51:14Z</dc:date>
    </item>
    <item>
      <title>Hierarchy and memory</title>
      <link>https://community.qlik.com/t5/QlikView/Hierarchy-and-memory/m-p/223637#M76136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you keep the Adjacent Nodes table, then my guess is that the creation of synthetic keys between your two tables is causing the problem.&lt;/P&gt;&lt;P&gt;But I'm guessing that you don't keep the Adjacent Nodes table. It looks like you're only using it to load the hierarchy table. In that case, one big problem may be that you have both tables in memory at the same time during the load, essentially doubling your memory requirements. I'd instead combine these into a single load, doing the hierarchy load directly from the SQL data instead of creating a temporary table to load from. That might be sufficient to resolve the problem.&lt;/P&gt;&lt;P&gt;There might be other issues. It isn't necessarily a problem in this specific section of the script, even if adding this script is what caused you to go over your memory limit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jan 2010 23:13:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hierarchy-and-memory/m-p/223637#M76136</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-01-26T23:13:50Z</dc:date>
    </item>
    <item>
      <title>Hierarchy and memory</title>
      <link>https://community.qlik.com/t5/QlikView/Hierarchy-and-memory/m-p/223638#M76137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John .. Thank for fast reply..&lt;/P&gt;&lt;P&gt;Adjacent Nodes table .. i'm not dropping this table .. i should right?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jan 2010 23:17:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hierarchy-and-memory/m-p/223638#M76137</guid>
      <dc:creator>amien</dc:creator>
      <dc:date>2010-01-26T23:17:42Z</dc:date>
    </item>
    <item>
      <title>Hierarchy and memory</title>
      <link>https://community.qlik.com/t5/QlikView/Hierarchy-and-memory/m-p/223639#M76138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;dropping table gives same result&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jan 2010 23:23:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hierarchy-and-memory/m-p/223639#M76138</guid>
      <dc:creator>amien</dc:creator>
      <dc:date>2010-01-26T23:23:36Z</dc:date>
    </item>
    <item>
      <title>Hierarchy and memory</title>
      <link>https://community.qlik.com/t5/QlikView/Hierarchy-and-memory/m-p/223640#M76139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John .. did you just build a Treeview in SQL and load that in QV?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jan 2010 23:24:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hierarchy-and-memory/m-p/223640#M76139</guid>
      <dc:creator>amien</dc:creator>
      <dc:date>2010-01-26T23:24:55Z</dc:date>
    </item>
    <item>
      <title>Hierarchy and memory</title>
      <link>https://community.qlik.com/t5/QlikView/Hierarchy-and-memory/m-p/223641#M76140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The only hierarchy loads I've done have been samples using inline data. For the few applications where I might consider using this, I would just load the node and parent node from SQL. I'd start simple, and work my way up from there. Something like this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;[Hierarchy]:&lt;BR /&gt;HIERARCHY (NodeID,ParentID,NodeName)&lt;BR /&gt;LOAD *;&lt;BR /&gt;SQL SELECT&lt;BR /&gt; NodeID&lt;BR /&gt;,ParentID&lt;BR /&gt;,NodeName&lt;BR /&gt;FROM TABLE;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jan 2010 23:37:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hierarchy-and-memory/m-p/223641#M76140</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-01-26T23:37:42Z</dc:date>
    </item>
    <item>
      <title>Hierarchy and memory</title>
      <link>https://community.qlik.com/t5/QlikView/Hierarchy-and-memory/m-p/223642#M76141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thats what i'm doing now .. and that causes lake of memory .. i want to make something in SQL now..&lt;/P&gt;&lt;P&gt;or make a full hierarchie:&lt;/P&gt;&lt;P&gt;level1, level2, level3, level4, all in 1 row..&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;add an additional column with the level of the nodeID&lt;/P&gt;&lt;P&gt;nodeid, parentid, level&lt;/P&gt;&lt;P&gt;.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any comments?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jan 2010 14:33:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hierarchy-and-memory/m-p/223642#M76141</guid>
      <dc:creator>amien</dc:creator>
      <dc:date>2010-01-27T14:33:27Z</dc:date>
    </item>
    <item>
      <title>Hierarchy and memory</title>
      <link>https://community.qlik.com/t5/QlikView/Hierarchy-and-memory/m-p/223643#M76142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John,&lt;/P&gt;&lt;P&gt;i'v found this example from you:&lt;/P&gt;&lt;P&gt;http://community.qlik.com/forums/p/19682/75132.aspx#75132&lt;/P&gt;&lt;P&gt;this is basicly what i need (last example) .. but i cant transform it into my data layout..&lt;/P&gt;&lt;P&gt;i dont have rowno() .. no BOM_ID .. i could add my Ultimate Parent for each NodeID if needed..&lt;/P&gt;&lt;P&gt;i only have NodeID, NodeName ,ParentID and Level (in relation to the UltimateParent)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jan 2010 23:28:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hierarchy-and-memory/m-p/223643#M76142</guid>
      <dc:creator>amien</dc:creator>
      <dc:date>2010-01-28T23:28:44Z</dc:date>
    </item>
    <item>
      <title>Hierarchy and memory</title>
      <link>https://community.qlik.com/t5/QlikView/Hierarchy-and-memory/m-p/223644#M76143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, doing a little testing, I made a very simple hierarchy out of 2.3 million rows with this script:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;[Hierarchy]:&lt;BR /&gt;HIERARCHY (NodeID,ParentID,L)&lt;BR /&gt;LOAD&lt;BR /&gt; recno() as NodeID&lt;BR /&gt;,if(recno()&amp;gt;1 and rand()&amp;gt;.3,ceil(rand()*(recno()-1))) as ParentID&lt;BR /&gt;,recno() as L&lt;BR /&gt;AUTOGENERATE 2300000;&lt;/P&gt;&lt;P&gt;During the load, memory usage peaked at about 820 MB, then dropped back to 210 MB when it was finished. For comparison, removing the hierarchy statement resulted in peak memory usage of 180 MB and 60 MB when finished. Baseline memory usage for QlikView looks to be about 15 MB, which I should probably subtract, giving us this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Load Peak After&lt;BR /&gt;Hiearchy 805 MB 195 MB&lt;BR /&gt;Raw Data 165 MB 45 MB&lt;/P&gt;&lt;P&gt;Assuming this is representative, and it may well not be, QlikView is using four to five times as much memory to create and store a hierarchy AS a hierarchy instead of as simple parentage information. I suppose that shouldn't surprise me, as the hierarchy load generated separate field names for 25 levels of data.&lt;/P&gt;&lt;P&gt;And this was using about the simplest node IDs I can - sequential integers. Since you're using node names in practice, QlikView will likely require substantially more memory than this for your real application, so I can see how it could easily fail with only 2GB of memory available.&lt;/P&gt;&lt;P&gt;So I guess I can say that some brief testing supports the idea that it isn't something you're doing wrong, or if it is, it's something we're both doing wrong (certainly possible). But my test seems like about the simplest sort of hierarchy load possible, so it's hard for me to see what I might have messed up.&lt;/P&gt;&lt;P&gt;If you can use simple, integer node IDs rather than node names, it might use somewhat less memory. That's about the only thing I have to suggest other than abandoning the hierarchy load.&lt;/P&gt;&lt;P&gt;Perhaps someone else with actual experience in hierarchy loads can be of more help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jan 2010 01:04:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hierarchy-and-memory/m-p/223644#M76143</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-01-29T01:04:55Z</dc:date>
    </item>
    <item>
      <title>Hierarchy and memory</title>
      <link>https://community.qlik.com/t5/QlikView/Hierarchy-and-memory/m-p/223645#M76144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok // i have loaded only the fields nodeid, parentid en nodename .. loading is no problem .. the pivot is the problem&lt;/P&gt;&lt;P&gt;in one sheet i have a list of all nodeids .. and in sheet 2 the pivot .. i qlik a nodeid and then switch to sheet 2 to see the pivot chart with all the related node-ids&lt;/P&gt;&lt;P&gt;any comments?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jan 2010 17:19:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hierarchy-and-memory/m-p/223645#M76144</guid>
      <dc:creator>amien</dc:creator>
      <dc:date>2010-01-29T17:19:20Z</dc:date>
    </item>
  </channel>
</rss>

