<?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 Merge with multiple columns or single column data model? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Merge-with-multiple-columns-or-single-column-data-model/m-p/838221#M294694</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am looking to get some feedback on what is generally best practice. We have a basic data model called customer usage that is processed at the end of the week, saved to QVD and not re-processed again. In this table we taken all the different types of usage and created a simple 5 column table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14301973039753189 jive_text_macro" jivemacro_uid="_14301973039753189"&gt;
&lt;P&gt;UserId&lt;/P&gt;
&lt;P&gt;WeekStartDate&lt;/P&gt;
&lt;P&gt;UsageTypeId&lt;/P&gt;
&lt;P&gt;UsageUnit&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On this table we do Sum or Count on UsageUnit using Set Analysis on the UsageType:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14301972791408730 jive_text_macro" jivemacro_uid="_14301972791408730"&gt;
&lt;P&gt;Sum({$&amp;lt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;UsageTypeId&lt;/SPAN&gt;={5}&amp;gt;}&lt;SPAN style="font-size: 13.3333330154419px;"&gt;UsageUnit&lt;/SPAN&gt;)&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We don't do sum on all the usagetypes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The overall document in particular is 1.6 GB with 400 million rows. As the data has grown we have been using the Document Analyzer to ensure we always get the best performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After trying a few things we found UserID and WeekStartDate being rather costly in table and state size due to the user has multiple entries per weekstartdate per userid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One idea which is favorable is to group and merge this model into:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14301975252395575" jivemacro_uid="_14301975252395575"&gt;
&lt;P&gt;UserId&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 9pt; line-height: 12pt;"&gt;WeekStartDate&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Usage1&lt;/P&gt;
&lt;P&gt;Usage2&lt;/P&gt;
&lt;P&gt;Usage3&lt;/P&gt;
&lt;P&gt;Usage4&lt;/P&gt;
&lt;P&gt;Usage5&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the real life situation the usage types would be named correctly but in this scenario we have over 30 different usages types. Using a simple range of 30 days the data sizes are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Original: 56 million rows. / 450mb table bytes. / Virtual memory &lt;SPAN style="font-size: 13.3333330154419px;"&gt;544 &lt;/SPAN&gt;mb&lt;/P&gt;&lt;P&gt;&amp;gt; Merged: 6.3 million rows. / 246mb table bytes / &lt;SPAN style="font-size: 13.3333330154419px;"&gt;Virtual memory &lt;SPAN style="font-size: 13.3333330154419px;"&gt;318&lt;/SPAN&gt; &lt;/SPAN&gt;mb&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there generally a good practice for something like this? The space saving and size does seem very appealing in the merged model but the null values in the merged model does make me shiver a little (not sure if thats a good or bad thing).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Love to hear your thoughts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Apr 2015 05:14:20 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-04-28T05:14:20Z</dc:date>
    <item>
      <title>Merge with multiple columns or single column data model?</title>
      <link>https://community.qlik.com/t5/QlikView/Merge-with-multiple-columns-or-single-column-data-model/m-p/838221#M294694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am looking to get some feedback on what is generally best practice. We have a basic data model called customer usage that is processed at the end of the week, saved to QVD and not re-processed again. In this table we taken all the different types of usage and created a simple 5 column table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14301973039753189 jive_text_macro" jivemacro_uid="_14301973039753189"&gt;
&lt;P&gt;UserId&lt;/P&gt;
&lt;P&gt;WeekStartDate&lt;/P&gt;
&lt;P&gt;UsageTypeId&lt;/P&gt;
&lt;P&gt;UsageUnit&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On this table we do Sum or Count on UsageUnit using Set Analysis on the UsageType:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14301972791408730 jive_text_macro" jivemacro_uid="_14301972791408730"&gt;
&lt;P&gt;Sum({$&amp;lt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;UsageTypeId&lt;/SPAN&gt;={5}&amp;gt;}&lt;SPAN style="font-size: 13.3333330154419px;"&gt;UsageUnit&lt;/SPAN&gt;)&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We don't do sum on all the usagetypes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The overall document in particular is 1.6 GB with 400 million rows. As the data has grown we have been using the Document Analyzer to ensure we always get the best performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After trying a few things we found UserID and WeekStartDate being rather costly in table and state size due to the user has multiple entries per weekstartdate per userid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One idea which is favorable is to group and merge this model into:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14301975252395575" jivemacro_uid="_14301975252395575"&gt;
&lt;P&gt;UserId&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 9pt; line-height: 12pt;"&gt;WeekStartDate&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Usage1&lt;/P&gt;
&lt;P&gt;Usage2&lt;/P&gt;
&lt;P&gt;Usage3&lt;/P&gt;
&lt;P&gt;Usage4&lt;/P&gt;
&lt;P&gt;Usage5&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the real life situation the usage types would be named correctly but in this scenario we have over 30 different usages types. Using a simple range of 30 days the data sizes are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Original: 56 million rows. / 450mb table bytes. / Virtual memory &lt;SPAN style="font-size: 13.3333330154419px;"&gt;544 &lt;/SPAN&gt;mb&lt;/P&gt;&lt;P&gt;&amp;gt; Merged: 6.3 million rows. / 246mb table bytes / &lt;SPAN style="font-size: 13.3333330154419px;"&gt;Virtual memory &lt;SPAN style="font-size: 13.3333330154419px;"&gt;318&lt;/SPAN&gt; &lt;/SPAN&gt;mb&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there generally a good practice for something like this? The space saving and size does seem very appealing in the merged model but the null values in the merged model does make me shiver a little (not sure if thats a good or bad thing).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Love to hear your thoughts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 05:14:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Merge-with-multiple-columns-or-single-column-data-model/m-p/838221#M294694</guid>
      <dc:creator />
      <dc:date>2015-04-28T05:14:20Z</dc:date>
    </item>
  </channel>
</rss>

