<?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: Two huge tables with 4 fields in common in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Two-huge-tables-with-4-fields-in-common/m-p/266441#M709849</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, here are my results:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;key type&amp;nbsp;&amp;nbsp; peak RAM&amp;nbsp; final RAM&amp;nbsp; load time&amp;nbsp; chart time&amp;nbsp; QVW size&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;synthetic&amp;nbsp;&amp;nbsp; 896 MB&amp;nbsp;&amp;nbsp; 568 MB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0:30&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 797 MS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 115 MB&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;synthetic&amp;nbsp;&amp;nbsp; 893 MB&amp;nbsp;&amp;nbsp; 576 MB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0:31&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 828 MS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;synthetic&amp;nbsp;&amp;nbsp; 868 MB&amp;nbsp;&amp;nbsp; 569 MB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0:31&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 844 MS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;synthetic&amp;nbsp;&amp;nbsp; 887 MB&amp;nbsp;&amp;nbsp; 569 MB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0:32&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 797 MS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;synthetic&amp;nbsp;&amp;nbsp; 864 MB&amp;nbsp;&amp;nbsp; 569 MB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0:31&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 859 MS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;hash128&amp;nbsp;&amp;nbsp;&amp;nbsp; 1104 MB&amp;nbsp;&amp;nbsp; 740 MB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0:11&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 797 MS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 146 MB&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;hash128&amp;nbsp;&amp;nbsp;&amp;nbsp; 1082 MB&amp;nbsp;&amp;nbsp; 733 MB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0:37&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 781 MS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;hash128&amp;nbsp;&amp;nbsp;&amp;nbsp; 1065 MB&amp;nbsp;&amp;nbsp; 733 MB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0:16&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 765 MS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;hash128&amp;nbsp;&amp;nbsp;&amp;nbsp; 1063 MB&amp;nbsp;&amp;nbsp; 730 MB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0:17&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 813 MS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;hash128&amp;nbsp;&amp;nbsp;&amp;nbsp; 1096 MB&amp;nbsp;&amp;nbsp; 733 MB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0:17&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 782 MS&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this is significantly overstating the memory requirements of the hash128 key.&amp;nbsp; These rows are very short, so a 16-byte key actually represents a pretty big chunk of memory, which probably explains why the RAM usage is so much higher.&amp;nbsp; I usually have more and bigger fields in real tables, so the hash128 key would be a much smaller piece of the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know why the hash128 load times varied so much.&amp;nbsp; Nothing else seemed to be going on on my machine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I didn't keep retesting QVW size, because in theory it should be exactly the same every time as it's storing exactly the same information every time.&amp;nbsp; I don't remember any deviations from that yesterday.&amp;nbsp; It also takes a while to store a file of this size.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I made some right predictions, and some wrong.&amp;nbsp; I might as well have flipped a coin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Jul 2011 19:33:17 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2011-07-14T19:33:17Z</dc:date>
    <item>
      <title>Two huge tables with 4 fields in common</title>
      <link>https://community.qlik.com/t5/QlikView/Two-huge-tables-with-4-fields-in-common/m-p/266431#M709832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;I have two big tables and the database isin SQL Server 2005. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;Table1 with about 25.000.000 where &lt;STRONG&gt;each row is a unique invoice&lt;/STRONG&gt; and Table2 with 50.000.000 rows where &lt;STRONG&gt;each row is a item from an invoice&lt;/STRONG&gt; (e.g.: 3 rows for an invoice if the costumer bought 3 different products).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I try to concatenate the fields that I need to create a Key, in the load I got a logic memory error. I've tried everything, concatenating all fields and creating a key, changing the type of datafield, synckey, etc. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;I discovered that if I use varchar(10) or less it works but anything above that doesn'twork. For me to get the right key I need a varchar bigger than 10. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;The fields that are common are:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Date &lt;/STRONG&gt;(smalldatetime in SQL, used &lt;EM&gt;&lt;SPAN lang="EN-US" style="color: purple; font-family: 'Courier New'; font-size: 9pt;"&gt;date&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: purple; font-family: 'Courier New'; font-size: 9pt;"&gt;daystart&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: purple; font-family: 'Courier New'; font-size: 9pt;"&gt;timestamp&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: green; font-family: 'Courier New'; font-size: 9pt;"&gt;date&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;'hh:mm:ss'&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;)))&lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;in QV)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;store_id&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;pos_id&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;invoice_id&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;The problem is that invoice_id isn’t unique foreach store, so I had to consider pos_id. I still got some errors in the resultsand I discovered that the database have some cases where the invoice_id isn’tunique for the same store_id and the same pos_id&amp;nbsp; depending on the period (don’t ask me why), soI had to consider the date too. So my key became very big.&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I tried the concatenate function in several ways like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="color: green; font-family: 'Courier New'; font-size: 9pt;"&gt;In Qlikview: date &amp;amp; store_id &amp;amp; pos_i &amp;amp; invoice_id&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="color: green; font-family: 'Courier New'; font-size: 9pt;"&gt;In the Select of SQL: cast(date as varchar) + cast(store_id as varchar(3)) + cast(pos_idas varchar(3)) + cast(invoice_id as varchar(6))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;The most important table for me is Table2, but I need the information about time from table one. I was able to get it using join between the four fields. So a new column came up in Table2 with the time information:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;Table2:&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;LOAD&lt;/SPAN&gt;&lt;/STRONG&gt;&amp;nbsp; &lt;SPAN lang="EN-US" style="color: green; font-family: 'Courier New'; font-size: 9pt;"&gt;date&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="color: green; font-family: 'Courier New'; font-size: 9pt;"&gt;store_id&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="color: green; font-family: 'Courier New'; font-size: 9pt;"&gt;pos_id&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="color: green; font-family: 'Courier New'; font-size: 9pt;"&gt;invoice_id&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="color: green; font-family: 'Courier New'; font-size: 9pt;"&gt;product_id&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;, &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="color: green; font-family: 'Courier New'; font-size: 9pt;"&gt;product_description&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="color: green; font-family: 'Courier New'; font-size: 9pt;"&gt;quantity&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="color: green; font-family: 'Courier New'; font-size: 9pt;"&gt;price&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="color: green; font-family: 'Courier New'; font-size: 9pt;"&gt;revenue &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;LEFT&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;JOIN&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; (&lt;EM&gt;Table2&lt;/EM&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;Table1:&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;LOAD&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="color: green; font-family: 'Courier New'; font-size: 9pt;"&gt;date&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;, &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="color: green; font-family: 'Courier New'; font-size: 9pt;"&gt;time&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;, &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="color: green; font-family: 'Courier New'; font-size: 9pt;"&gt;invoice_id&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;, &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="color: green; font-family: 'Courier New'; font-size: 9pt;"&gt;store_id&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;, &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="color: green; font-family: 'Courier New'; font-size: 9pt;"&gt;pos_id&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="color: green; font-family: 'Courier New'; font-size: 9pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The thing is&lt;STRONG&gt; I need to identify the unique invoices&lt;/STRONG&gt; and if I have just one table at the end &lt;STRONG&gt;I need to be able to count distinct invoices&lt;/STRONG&gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Already tried too create a field in table1 with all four fields concatenated, and after that did the same process as for the time but didn't work (memory problem when it reaches a specific number of rows loaded).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems that when I have a table with a lot of rows, there cannot be a field with a lot of data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Can anyone help me with a solution please?&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jul 2011 00:25:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-huge-tables-with-4-fields-in-common/m-p/266431#M709832</guid>
      <dc:creator />
      <dc:date>2011-07-08T00:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: Two huge tables with 4 fields in common</title>
      <link>https://community.qlik.com/t5/QlikView/Two-huge-tables-with-4-fields-in-common/m-p/266432#M709834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, you can count distinct invoices with count(distinct invoice_id).&amp;nbsp; If one table isn't the solution to your problem, what happens if you leave the tables as they were?&amp;nbsp; By that I mean what happens if you leave the date field, store_id field, pos_id field and invoice_id alone and on their respective tables?&amp;nbsp; I would expect a 4-field synthetic key to be formed, but if it fits in your memory and gives the right answers, there's nothing specifically wrong with this synthetic key.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jul 2011 00:36:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-huge-tables-with-4-fields-in-common/m-p/266432#M709834</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-07-08T00:36:16Z</dc:date>
    </item>
    <item>
      <title>Two huge tables with 4 fields in common</title>
      <link>https://community.qlik.com/t5/QlikView/Two-huge-tables-with-4-fields-in-common/m-p/266433#M709837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Neither concatenating nor joining is a sound approach to handle header-detail type files from database design point of view. Table1 is a header file having one row for each unique invoice (probably defined by a group of fields such as invoice_id, store_id, pos_id, date, etc.). Table2 is a detail file which may contain one or more rows for each unique invoice. These tables are to be linked (in QlikView sense) by the unique invoice if you need to report using data in both tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As advised by John, keeping the files separate but linked seems to be a good or the only correct approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are concerned about the synthetic keys, we may eliminate them by using a combined key (e.g. with Autonumber function) and renaming some fields in one of the tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jul 2011 00:58:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-huge-tables-with-4-fields-in-common/m-p/266433#M709837</guid>
      <dc:creator>nagaiank</dc:creator>
      <dc:date>2011-07-08T00:58:18Z</dc:date>
    </item>
    <item>
      <title>Two huge tables with 4 fields in common</title>
      <link>https://community.qlik.com/t5/QlikView/Two-huge-tables-with-4-fields-in-common/m-p/266434#M709839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the replies guys but I've tried working with one table, working with two tables and synthetic key.... in all the scenarios I couldn't load all records because of the memory problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been able to do the first challenge as I said after a lot of tries joining the two tables and getting the time from table1 to table2. I've loaded all the records without a problem and it worked. But I wasn't able to count distinct invoices.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I even tried to create a new column in the original database in SQL for table1 with a unique value (1 to N) and load this field, but I still got the same problem. I think the number is to big (25.000.000).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using autonumber function will get me in the same as I described above and another problem for autonumber is that I'll use incremental load in the future for all this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jul 2011 01:25:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-huge-tables-with-4-fields-in-common/m-p/266434#M709839</guid>
      <dc:creator />
      <dc:date>2011-07-08T01:25:40Z</dc:date>
    </item>
    <item>
      <title>Two huge tables with 4 fields in common</title>
      <link>https://community.qlik.com/t5/QlikView/Two-huge-tables-with-4-fields-in-common/m-p/266435#M709841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried to create a map table of table 1 using autonumber(date,store,pos,Invoice) and then use applymap when loading table 2 to get the time? Henrik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jul 2011 04:54:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-huge-tables-with-4-fields-in-common/m-p/266435#M709841</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-07-08T04:54:59Z</dc:date>
    </item>
    <item>
      <title>Two huge tables with 4 fields in common</title>
      <link>https://community.qlik.com/t5/QlikView/Two-huge-tables-with-4-fields-in-common/m-p/266436#M709843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, but I've tried just now and didn't work resulting in the same memory error: &lt;EM&gt;"OUT OF VIRTUAL AND/OR LOGICAL MEMORY, allocating&amp;nbsp; 2MB".&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe instead concatenating 4 fields and creating a unique key I can try concatenating just 2 in key1 and the other 2 in key2 and use two keys? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm starting to think that I cannot load all the data. How can I know the limit? I think the problem is a big field where I have 1 to 25.000.000 and a big table with more then 40.000.000 rows.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jul 2011 19:04:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-huge-tables-with-4-fields-in-common/m-p/266436#M709843</guid>
      <dc:creator />
      <dc:date>2011-07-08T19:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: Two huge tables with 4 fields in common</title>
      <link>https://community.qlik.com/t5/QlikView/Two-huge-tables-with-4-fields-in-common/m-p/266437#M709845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Cassiano.Reis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have experience with VERY large clients, my company is a QlikTech Elite Partner.&lt;/P&gt;&lt;P&gt;Tables of 300m+ rows are common.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When working with large sets of data, the data model is *VERY* important.&lt;/P&gt;&lt;P&gt;You must NEVER have syntetic keys or loops.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even joining two big tables, like invoice header and invoice rows, which both usually are massive tables, takes tremendous amounts of RAM, we're talking gigs here. And if it's joing on four fields (syntetic keys) it would never be finished.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;So my tip is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;InvoiceHead:&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;LOAD&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: green; font-size: 9pt;"&gt;date &amp;amp; '~' &amp;amp; store_id &amp;amp; '~' &amp;amp; pos_i &amp;amp; '~' &amp;amp; invoice_id as [%InvoiceKey],&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: green; font-size: 9pt;"&gt;date as InvoiceHeadDate&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: green; font-size: 9pt;"&gt;store_id&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: green; font-size: 9pt;"&gt;pos_id&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: green; font-size: 9pt;"&gt;invoice_id&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: green; font-size: 9pt;"&gt;product_id&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: green; font-size: 9pt;"&gt;product_description&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: green; font-size: 9pt;"&gt;quantity&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: green; font-size: 9pt;"&gt;price&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: green; font-size: 9pt;"&gt;revenue &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;InvoiceRow:&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;LOAD&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: green; font-size: 9pt;"&gt;date &amp;amp; '~' &amp;amp; store_id &amp;amp; '~' &amp;amp; pos_i &amp;amp; '~' &amp;amp; invoice_id as [%InvoiceKey],&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: green; font-size: 9pt;"&gt;date as InvoiceRowDate&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: green; font-size: 9pt;"&gt;time&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: green; font-size: 9pt;"&gt;//invoice_id&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: green; font-size: 9pt;"&gt;//store_id&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: green; font-size: 9pt;"&gt;//pos_id&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: #000000; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: #000000; font-size: 9pt;"&gt;And if you absolutely need to join the tables, join on ONE key, in this case [%InvoiceKey], joining on four fields will make you run out of memory.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2011 11:35:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-huge-tables-with-4-fields-in-common/m-p/266437#M709845</guid>
      <dc:creator>magavi_framsteg</dc:creator>
      <dc:date>2011-07-13T11:35:40Z</dc:date>
    </item>
    <item>
      <title>Re: Two huge tables with 4 fields in common</title>
      <link>https://community.qlik.com/t5/QlikView/Two-huge-tables-with-4-fields-in-common/m-p/266438#M709846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Magnus Åvitsland wrote:&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;When working with large sets of data, the data model is *VERY* important.&lt;/P&gt;&lt;P&gt;You must NEVER have syntetic keys or loops.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even joining two big tables, like invoice header and invoice rows, which both usually are massive tables, takes tremendous amounts of RAM, we're talking gigs here. And if it's joing on four fields (syntetic keys) it would never be finished.&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: #000000; font-size: 9pt;"&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: #000000; font-size: 9pt;"&gt;And if you absolutely need to join the tables, join on ONE key, in this case [%InvoiceKey], joining on four fields will make you run out of memory.&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps I should explain further why I suggest leaving the synthetic key in place.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To the best of my knowledge, synthetic keys use slightly less memory and perform slightly faster than composite keys of the same structure.&amp;nbsp; To the best of my knowledge, that's because synthetic keys and composite keys are almost identical internally in QlikView, with probably a tiny bit less overhead for synthetic keys since you can't actually reference the table or key value directly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That would indicate that synthetic keys are merely no worse than composite keys.&amp;nbsp; However, in my experience, they're significantly better because of load time.&amp;nbsp; While some of us hypothesize that there may be a case where a synthetic key loads more slowly, all examples I've ever seen show a significantly faster load time for the synthetic key than the equivalent composite key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So let's take your example.&amp;nbsp; The composite key you suggest is not quite a 1:1 replacement for the synthetic key since it isn't given a separate table, but it is functionally identical and I think it should give similar performance results.&amp;nbsp; Certainly if we got some performance improvement out of moving it to one of the associated tables I'd be surprised, and it would be something I'd want to know.&amp;nbsp; So it should do just fine for our purposes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've randomized data and stuck it into QVDs for our sources, and I make sure I don't get an optimized load so that we're comparing apples to apples.&amp;nbsp; I will compare performance loading the tables raw (and forming a 4-field synthetic key) vs. doing what you suggested with a composite key.&amp;nbsp; I'm using 2 million rows for the invoice headers and 8 million rows for invoice lines.&amp;nbsp; I'd use more, but I'm on an old computer and it'd start swapping to disk or run out of memory.&amp;nbsp; If you theorize that the ratios of performance measurements change in some way with ten or fifty times the volume, someone else may need to run the same test to see (application attached).&amp;nbsp; The chart mentioned is a sum of revenue by product (I've moved Revenue to the invoice line table so that both tables and all rows are used for this chart).&amp;nbsp; The chart time is measured by turning off caching, putting it on its own tab, switching to that tab when the load is complete and the CPU has gone back to 0, and checking the CalcTime.&amp;nbsp; I ran multiple trials.&amp;nbsp; Testing was done with 32-bit version 10 SR2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; peak RAM&amp;nbsp; final RAM&amp;nbsp; load time&amp;nbsp; chart time&amp;nbsp; QVW size&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;synthetic&amp;nbsp;&amp;nbsp; 760000 K&amp;nbsp; 424000 K&amp;nbsp;&amp;nbsp; 0:37&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 812 MS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 149000 K&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;synthetic&amp;nbsp;&amp;nbsp; 740000 K&amp;nbsp; 424000 K&amp;nbsp;&amp;nbsp; 0:39&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 828 MS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 149000 K&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;synthetic&amp;nbsp;&amp;nbsp; 760000 K&amp;nbsp; 424000 K&amp;nbsp;&amp;nbsp; 0:38&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 812 MS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 149000 K&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;composite&amp;nbsp;&amp;nbsp; 821000 K&amp;nbsp; 493000 K&amp;nbsp;&amp;nbsp; 1:01&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 797 MS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 163000 K&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;composite&amp;nbsp;&amp;nbsp; 819000 K&amp;nbsp; 493000 K&amp;nbsp;&amp;nbsp; 0:59&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 797 MS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 163000 K&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;composite&amp;nbsp;&amp;nbsp; 821000 K&amp;nbsp; 495000 K&amp;nbsp;&amp;nbsp; 0:59&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 797 MS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 163000 K&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some of these numbers did surprise me a little.&amp;nbsp; I did expect the composite key to use more memory, but only slightly, almost negligibly.&amp;nbsp; Instead, the synthetic key is significantly better in this regard.&amp;nbsp; That further cements my recommendation to leave the synthetic key in place in this case, since memory is apparently the critical resource for this load, and is conserved by using a synthetic key.&amp;nbsp; Second, I expected chart times to be nearly identical.&amp;nbsp; They are, but there IS a tiny but consistent edge to the composite key in these measurements.&amp;nbsp; I'm going to guess that that's because it isn't an exact 1:1 replacement for the synthetic key, so there's one less link to follow, but that IS an advantage if it's real and not just noise in the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've attached the application I used for this testing if someone wishes to duplicate or contradict my results on a different computer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more information on synthetic keys, I recommend this thread:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/thread/10279?start=30&amp;amp;tstart=0"&gt;http://community.qlik.com/thread/10279?start=30&amp;amp;tstart=0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit:&amp;nbsp; We typically autonumber() a composite key like this, so I tried that for comparison:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;key type&amp;nbsp;&amp;nbsp;&amp;nbsp; peak RAM&amp;nbsp; final RAM&amp;nbsp; load time&amp;nbsp; chart time&amp;nbsp; QVW size&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;synthetic&amp;nbsp;&amp;nbsp; 760000 K&amp;nbsp; 424000 K&amp;nbsp;&amp;nbsp; 0:37&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 812 MS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 149000 K&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;synthetic&amp;nbsp;&amp;nbsp; 740000 K&amp;nbsp; 424000 K&amp;nbsp;&amp;nbsp; 0:39&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 828 MS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 149000 K&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;synthetic&amp;nbsp;&amp;nbsp; 760000 K&amp;nbsp; 424000 K&amp;nbsp;&amp;nbsp; 0:38&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 812 MS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 149000 K&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;composite&amp;nbsp;&amp;nbsp; 821000 K&amp;nbsp; 493000 K&amp;nbsp;&amp;nbsp; 1:01&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 797 MS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 163000 K&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;composite&amp;nbsp;&amp;nbsp; 819000 K&amp;nbsp; 493000 K&amp;nbsp;&amp;nbsp; 0:59&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 797 MS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 163000 K&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;composite&amp;nbsp;&amp;nbsp; 821000 K&amp;nbsp; 495000 K&amp;nbsp;&amp;nbsp; 0:59&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 797 MS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 163000 K&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;autonumber&amp;nbsp; 897000 K&amp;nbsp; 405000 K&amp;nbsp;&amp;nbsp; 1:42&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 781 MS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 146000 K&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;autonumber&amp;nbsp; 899000 K&amp;nbsp; 407000 K&amp;nbsp;&amp;nbsp; 1:42&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 813 MS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 146000 K&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;autonumber&amp;nbsp; 898000 K&amp;nbsp; 407000 K&amp;nbsp;&amp;nbsp; 1:42&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 828 MS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 146000 K&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The load slows down a lot and uses more peak RAM, so this is probably a poor solution in this case.&amp;nbsp; However, the final RAM and file size usage is lower than the synthetic key.&amp;nbsp; That may be useful in some cases.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2011 19:12:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-huge-tables-with-4-fields-in-common/m-p/266438#M709846</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-07-13T19:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: Two huge tables with 4 fields in common</title>
      <link>https://community.qlik.com/t5/QlikView/Two-huge-tables-with-4-fields-in-common/m-p/266439#M709847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your very interesting reply.&lt;/P&gt;&lt;P&gt;I cannot hesitate participating in analyzing this challenging and interesting problem.&lt;/P&gt;&lt;P&gt;In fact, I am testing your app right now using QV Desktop v9 SR7 x64.&lt;/P&gt;&lt;P&gt;The good thing is I have massive servers at my client.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did some modifications to the script, it is attached to this post:&lt;/P&gt;&lt;P&gt;testSyntheticKey7.qvw&lt;/P&gt;&lt;P&gt;What i did was to pre-create the composite key, because this is usually what you do. Specifically when the QVD is loaded in more than one file.&lt;/P&gt;&lt;P&gt;But for the cases of load times, I create the composite key in the load script, it only exists in the QVD for quicker modelling and calculations with QV Optimizer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The specs are:&lt;/P&gt;&lt;P&gt;- Physical Windows Server 2008 R2 x64&lt;/P&gt;&lt;P&gt;- 128Gb RAM&lt;/P&gt;&lt;P&gt;- Intel Xeon E5530 @ 2,4Ghz&lt;/P&gt;&lt;P&gt;- 2 CPU:s x4 cores = 8 cores in total&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will send my results later today, or tomorrow.&lt;/P&gt;&lt;P&gt;Can you please explain how you did all your measures, like peak RAM, final RAM etc.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My results so far:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;InvoideHead with 2m rows&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;InvoiceRow with 8m rows&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;key type&amp;nbsp;&amp;nbsp;&amp;nbsp; peak RAM&amp;nbsp; final RAM&amp;nbsp; load time&amp;nbsp; chart time&amp;nbsp; QVW size&lt;/STRONG&gt;&lt;BR /&gt;synthetic&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xxxxxx K&amp;nbsp; 456872 K&amp;nbsp;&amp;nbsp; 1:20&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 343 MS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 149000 K&lt;BR /&gt;synthetic&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xxxxxx K&amp;nbsp; 452296 K&amp;nbsp;&amp;nbsp; 1:21&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 344 MS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 149000 K&lt;BR /&gt;synthetic&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xxxxxx K&amp;nbsp; 452020 K&amp;nbsp;&amp;nbsp; 1:16&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 312 MS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 149000 K&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;composite&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xxxxxx K&amp;nbsp; 509164 K&amp;nbsp;&amp;nbsp; 5:27&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 312 MS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 163000 K&lt;BR /&gt;composite&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xxxxxx K&amp;nbsp; 511024 K&amp;nbsp;&amp;nbsp; 5:26&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 296 MS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 163000 K&lt;BR /&gt;composite&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xxxxxx K&amp;nbsp; 511504 K&amp;nbsp;&amp;nbsp; 5:28&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 328 MS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 163000 K&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;autonumber&amp;nbsp; xxxxxx K&amp;nbsp; 442524 K&amp;nbsp;&amp;nbsp; 5:39&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 296 MS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 117000 K&lt;BR /&gt;autonumber&amp;nbsp; xxxxxx K&amp;nbsp; 484360 K&amp;nbsp;&amp;nbsp; 5:23&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 328 MS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 117000 K&lt;BR /&gt;autonumber&amp;nbsp; xxxxxx K&amp;nbsp; 485336 K&amp;nbsp;&amp;nbsp; 5:25&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 296 MS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 117000 K&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;InvoideHead with 20m rows&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;InvoiceRow with 80m rows&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Optimized load. Composite keys pre-created in QVDs, otherwise the test would take too long.&lt;/P&gt;&lt;P&gt;But since it's so much data the load times are long enough for a (rather) scientific test anyways.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;key type&amp;nbsp;&amp;nbsp;&amp;nbsp; peak RAM&amp;nbsp; final RAM&amp;nbsp; load time&amp;nbsp; chart time&amp;nbsp; QVW size&lt;/STRONG&gt;&lt;BR /&gt;synthetic&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xxxxxx Kb&amp;nbsp; 5847468 Kb&amp;nbsp;&amp;nbsp; 5:29&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2995 ms&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1173000 Kb&lt;BR /&gt;synthetic&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xxxxxx Kb&amp;nbsp; 5847504 Kb&amp;nbsp;&amp;nbsp; 5:58&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2918 ms&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1173000 Kb&lt;BR /&gt;synthetic&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xxxxxx Kb&amp;nbsp; 5850380 Kb&amp;nbsp;&amp;nbsp; 6:01&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2917 ms&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1173000 Kb&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;composite&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xxxxxx Kb&amp;nbsp; 7352208 Kb&amp;nbsp;&amp;nbsp; 3:23&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2901 ms&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1185451 Kb&lt;BR /&gt;composite&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xxxxxx Kb&amp;nbsp; 7353248 Kb&amp;nbsp;&amp;nbsp; 3:37&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2964 ms&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1185451 Kb&lt;BR /&gt;composite&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xxxxxx Kb&amp;nbsp; 7353180 Kb&amp;nbsp;&amp;nbsp; 3:48&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3026 ms&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1185451 Kb&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;autonumber&amp;nbsp; xxxxxx Kb&amp;nbsp; 5658888 Kb&amp;nbsp;&amp;nbsp; 3:10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2964 ms&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1012265 Kb&lt;BR /&gt;autonumber&amp;nbsp; xxxxxx Kb&amp;nbsp; 5655144 Kb&amp;nbsp;&amp;nbsp; 3:19&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2948 ms&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1012265 Kb&lt;BR /&gt;autonumber&amp;nbsp; xxxxxx Kb&amp;nbsp; 5659204 Kb&amp;nbsp;&amp;nbsp; 3:02&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2932 ms&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1012265 Kb&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Conclusion:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I should have run another test with InvoiceHead 50 000 000 rows and InvoiceLine 200 000 000 rows, but there was simply no time for that, these tests took almost the whole day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot compare the above results because the test on 20m and 80m the key fields were calculated on the fly by the load script.&lt;/P&gt;&lt;P&gt;But for the second test I absolutely needed to pre-create them in the QVD to get the optimized load, else I would have needed some automated test tools to run them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Usually composite keys are in face pre-created in the QVD-layer (data layer) so that the application layer can load all QVD:s optimized.&lt;/P&gt;&lt;P&gt;In terms of load time I think composite keys have the edge.&lt;/P&gt;&lt;P&gt;Also when it comes to RAM-usage, composite keys use slightly less.&lt;/P&gt;&lt;P&gt;Synthetic keys though seem to be more effective, faster calculations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I would have to re-run the first test.&lt;/P&gt;&lt;P&gt;No evidence yet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Uploaded testSyntheticKey7.qvw&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2011 07:43:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-huge-tables-with-4-fields-in-common/m-p/266439#M709847</guid>
      <dc:creator>magavi_framsteg</dc:creator>
      <dc:date>2011-07-14T07:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: Two huge tables with 4 fields in common</title>
      <link>https://community.qlik.com/t5/QlikView/Two-huge-tables-with-4-fields-in-common/m-p/266440#M709848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for taking this on.&amp;nbsp; I'm VERY curious how things change or stay the same with larger volumes of data, and as we make the test a bit more realistic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I measured peak RAM by having Windows Task Manager open and watching the memory usage of the QlikView process.&amp;nbsp; I recorded the highest number I saw.&amp;nbsp; I measured final RAM the same way, looking at memory usage of the process once it completed.&amp;nbsp; Load time I calculated from the start and end timestamps in the log.&amp;nbsp; Chart time I already mentioned, and QVW size should be obvious.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I agree that in the real world, you'd create the composite keys during creation of the QVDs, so I probably should have&amp;nbsp; done that as well.&amp;nbsp; However, that time is taken SOMEWHERE, so in that case, I would have needed to measure the difference in time for creating the QVDs with and without the composite keys and added that in.&amp;nbsp; It seemed simpler and hopefully fair to create the composite keys during the load, and just make sure both loads were unoptimized so I wasn't getting an artificial advantage.&amp;nbsp; With the more realistic approach, you'd want two sets of QVDs, one with the composite key and one without.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What are you doing for the autonumber tests?&amp;nbsp; Does the QVD contain autonumbered keys?&amp;nbsp; In many cases, that would be unrealistic, as QVDs are often created by different QVWs.&amp;nbsp; However, if we knew that autonumbered keys were better (I believe they are if they can be done), it would be a simple matter to do both the invoice header QVD and the invoice row QVD in the same QVW so that the autonumber results were consistent.&amp;nbsp; Hmmm, this could also present problems for incremental loads, as we'd likely be using in practice.&amp;nbsp; Most of mine load from the database first, then from the QVD.&amp;nbsp; I think that would make it hard to autonumber.&amp;nbsp; We could use a hash128() perhaps, but I wouldn't.&amp;nbsp; Even though in practice you'd never have a collision, it is POSSIBLE to have a collision, and I don't like opening that door.&amp;nbsp; Still, the chances are so low that we might as well be afraid of cosmic rays causing load problems as well.&amp;nbsp; Or maybe I calculated the chances with hash256().&amp;nbsp; I can't remember.&amp;nbsp; Probably hash128() is a practical solution for autonumbered keys when we're using incremental loads.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hmmm, speaking of incremental loads, that might mean your load times are more fair than I thought, and don't need to include the time to create the composite key.&amp;nbsp; Most of our large QVDs like this are created incrementally.&amp;nbsp; Our largest is perhaps twenty million rows.&amp;nbsp; But we certainly don't load twenty million rows from the database every time we create the QVD.&amp;nbsp; It's an incremental load, and we probably only load tens of thousands of rows from the database each time.&amp;nbsp; That time is negligible compared to the time to create a synthetic key across tens of millions of rows every time you load FROM the QVD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another good reason to have composite keys is the frequency with which we use exists(key) when loading from QVDs.&amp;nbsp; In many cases, having it available will speed things up regardless of whether you're ultimately building synthetic keys or not.&amp;nbsp; And if you've already built composite keys, why build a synthetic key to do the same thing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I feel like I'm rambling, but hopefully it's good rambling.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit: I plan to modify my test to create a set of QVDs with a hash128() key.&amp;nbsp; I won't count the extra time required to create the key because we are assumed to be using incremental loads.&amp;nbsp; With that QVD in place, I expect the hash128() key approach to beat the synthetic key approach in all of the measures we're making except for peak RAM.&amp;nbsp; That is, of course, the limitation that spawned this thread, so I may still recommend synthetic keys in this particular example.&amp;nbsp; But where that isn't an issue, I expect to be backing off from my position on synthetic keys.&amp;nbsp; I don't know if I'll be able to get to this today, unfortunately.&amp;nbsp; I have several tasks that I'm behind on.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2011 16:50:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-huge-tables-with-4-fields-in-common/m-p/266440#M709848</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-07-14T16:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: Two huge tables with 4 fields in common</title>
      <link>https://community.qlik.com/t5/QlikView/Two-huge-tables-with-4-fields-in-common/m-p/266441#M709849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, here are my results:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;key type&amp;nbsp;&amp;nbsp; peak RAM&amp;nbsp; final RAM&amp;nbsp; load time&amp;nbsp; chart time&amp;nbsp; QVW size&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;synthetic&amp;nbsp;&amp;nbsp; 896 MB&amp;nbsp;&amp;nbsp; 568 MB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0:30&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 797 MS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 115 MB&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;synthetic&amp;nbsp;&amp;nbsp; 893 MB&amp;nbsp;&amp;nbsp; 576 MB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0:31&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 828 MS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;synthetic&amp;nbsp;&amp;nbsp; 868 MB&amp;nbsp;&amp;nbsp; 569 MB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0:31&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 844 MS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;synthetic&amp;nbsp;&amp;nbsp; 887 MB&amp;nbsp;&amp;nbsp; 569 MB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0:32&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 797 MS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;synthetic&amp;nbsp;&amp;nbsp; 864 MB&amp;nbsp;&amp;nbsp; 569 MB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0:31&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 859 MS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;hash128&amp;nbsp;&amp;nbsp;&amp;nbsp; 1104 MB&amp;nbsp;&amp;nbsp; 740 MB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0:11&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 797 MS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 146 MB&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;hash128&amp;nbsp;&amp;nbsp;&amp;nbsp; 1082 MB&amp;nbsp;&amp;nbsp; 733 MB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0:37&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 781 MS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;hash128&amp;nbsp;&amp;nbsp;&amp;nbsp; 1065 MB&amp;nbsp;&amp;nbsp; 733 MB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0:16&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 765 MS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;hash128&amp;nbsp;&amp;nbsp;&amp;nbsp; 1063 MB&amp;nbsp;&amp;nbsp; 730 MB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0:17&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 813 MS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;hash128&amp;nbsp;&amp;nbsp;&amp;nbsp; 1096 MB&amp;nbsp;&amp;nbsp; 733 MB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0:17&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 782 MS&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this is significantly overstating the memory requirements of the hash128 key.&amp;nbsp; These rows are very short, so a 16-byte key actually represents a pretty big chunk of memory, which probably explains why the RAM usage is so much higher.&amp;nbsp; I usually have more and bigger fields in real tables, so the hash128 key would be a much smaller piece of the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know why the hash128 load times varied so much.&amp;nbsp; Nothing else seemed to be going on on my machine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I didn't keep retesting QVW size, because in theory it should be exactly the same every time as it's storing exactly the same information every time.&amp;nbsp; I don't remember any deviations from that yesterday.&amp;nbsp; It also takes a while to store a file of this size.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I made some right predictions, and some wrong.&amp;nbsp; I might as well have flipped a coin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2011 19:33:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-huge-tables-with-4-fields-in-common/m-p/266441#M709849</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-07-14T19:33:17Z</dc:date>
    </item>
    <item>
      <title>Two huge tables with 4 fields in common</title>
      <link>https://community.qlik.com/t5/QlikView/Two-huge-tables-with-4-fields-in-common/m-p/266442#M709850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is becoming very interesting!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Magnus, in one of my attempts before I did exactly as you said, but the same error appears.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think is because my RAM limitations, because I'm running:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;InvoideHead with 24m rows&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;InvoiceRow with 42m rows&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With the following specs:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Windows 7 32-bit&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;4Gb RAM&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Intel Core 2 Duo P8600 @ 2,4Ghz&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Seems that in 32-bit system a single program can use only 2 Gb of RAM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2011 19:47:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-huge-tables-with-4-fields-in-common/m-p/266442#M709850</guid>
      <dc:creator />
      <dc:date>2011-07-14T19:47:14Z</dc:date>
    </item>
    <item>
      <title>Two huge tables with 4 fields in common</title>
      <link>https://community.qlik.com/t5/QlikView/Two-huge-tables-with-4-fields-in-common/m-p/266443#M709851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Right, a 32-bit program can only use 2 GB of RAM, regardless of how much RAM you actually have.&amp;nbsp; There's a setting that will give you 3 GB, but when I tried it myself, it made my computer unbootable and it took hours of tech help to recover.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can see it being hard to impossible to load 66 million rows of data into 2 GB of memory or 3 GB for that matter.&amp;nbsp; You may need a 64-bit machine and 64-bit QlikView if you really need that much data to be accessible at once.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2011 20:12:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-huge-tables-with-4-fields-in-common/m-p/266443#M709851</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-07-14T20:12:14Z</dc:date>
    </item>
    <item>
      <title>Two huge tables with 4 fields in common</title>
      <link>https://community.qlik.com/t5/QlikView/Two-huge-tables-with-4-fields-in-common/m-p/266444#M709852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Following up on my comment about the danger of using hash128 to make keys, I found an old post where I calculated that for 10 million random keys, the chance of having a hash collision was 0 to at least 25 decimal places.&amp;nbsp; My conclusion:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"I wouldn't solve the 'generated keys across multiple scripts' problem in this way. But mostly it's because it offends me mathematically, not because there would EVER be a problem in practice."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/message/64902"&gt;http://community.qlik.com/message/64902&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2011 20:41:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-huge-tables-with-4-fields-in-common/m-p/266444#M709852</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-07-14T20:41:51Z</dc:date>
    </item>
    <item>
      <title>Re: Two huge tables with 4 fields in common</title>
      <link>https://community.qlik.com/t5/QlikView/Two-huge-tables-with-4-fields-in-common/m-p/266445#M709853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was unable to continue testing today.&lt;BR /&gt;This will just be a quick reply, I will catch up on this on August 15th unfortunately (holiday).&lt;/P&gt;&lt;P&gt;At that date I will load Head 100m, Lines 400m&lt;BR /&gt;That would be a quite nice test&lt;/P&gt;&lt;P&gt;The biggest machine has 1Tb RAM and Xeon 7550 with 4CPUs, each with 8 cores = 32 cores in total - BAD ASS I tell you =))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John I agree autonumber(w or w/o hash) usually is not possible.&lt;BR /&gt;What you can do if possible at the client's DW or DB or whatever they have, is create the mapping table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;compositeKey&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; key&lt;BR /&gt;date+invoice+pos+store 1&lt;BR /&gt;date+invoice+pos+store 2&lt;BR /&gt;date+invoice+pos+store 3&lt;BR /&gt;date+invoice+pos+store ..n&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And have your DW-views (preferred) join this key table.&lt;/P&gt;&lt;P&gt;That way incremental loads are possible, and you get a very small and effective key.&lt;/P&gt;&lt;P&gt;This I've found very useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also I did the measurments the same way you did, but I couldn't figure out PeakRAM.&lt;BR /&gt;But I guess recording (counters) or just looking at taskman is good enough.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Cassiano:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If you absolutely need all invoice rows and you run out of memory.&lt;/P&gt;&lt;P&gt;Is that during load or during evaluation of your chart?&lt;/P&gt;&lt;P&gt;In the latter you could always enable "show conditions" and/or "calculation conditions".&lt;/P&gt;&lt;P&gt;That way you can force the user to atleast select ONE YearMonth or one store or whatever.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well, this was a very fun end of week before my summer holiday =))&lt;/P&gt;&lt;P&gt;Thanks to you all and especially John W for giving us this nasty fun interesting problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2011 21:41:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-huge-tables-with-4-fields-in-common/m-p/266445#M709853</guid>
      <dc:creator>magavi_framsteg</dc:creator>
      <dc:date>2011-07-14T21:41:25Z</dc:date>
    </item>
    <item>
      <title>Two huge tables with 4 fields in common</title>
      <link>https://community.qlik.com/t5/QlikView/Two-huge-tables-with-4-fields-in-common/m-p/266446#M709854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just to end this discussion &lt;STRONG&gt;my problem is actually the amount of RAM&lt;/STRONG&gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;During the load process I left my Task Manager opened and watched the amount of RAM that Qlikview was draining. It reached almost 1.850.000 before the error message. Seems that I &lt;STRONG&gt;need more RAM and a 64-bits machine &lt;/STRONG&gt;as John mentioned. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anybody has this kind of problem in the future I advise to do the test above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;﻿I think all the discussion will be helpful to anyone that is looking for information about the options that exists to ﻿join large tables needing to use more than just one field for that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Thank you John and Magnus, and everyone who tried to help! I really appreciate it.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Sep 2011 13:24:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-huge-tables-with-4-fields-in-common/m-p/266446#M709854</guid>
      <dc:creator />
      <dc:date>2011-09-01T13:24:56Z</dc:date>
    </item>
    <item>
      <title>Two huge tables with 4 fields in common</title>
      <link>https://community.qlik.com/t5/QlikView/Two-huge-tables-with-4-fields-in-common/m-p/266447#M709855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Always glad to be of service.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/21613"&gt;Magnus Åvitsland&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BI Consultant&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.framsteg.com" target="_blank"&gt;Framsteg Business Intelligence Corp.&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Sep 2011 14:26:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-huge-tables-with-4-fields-in-common/m-p/266447#M709855</guid>
      <dc:creator>magavi_framsteg</dc:creator>
      <dc:date>2011-09-19T14:26:15Z</dc:date>
    </item>
    <item>
      <title>Two huge tables with 4 fields in common</title>
      <link>https://community.qlik.com/t5/QlikView/Two-huge-tables-with-4-fields-in-common/m-p/266448#M709856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just out of interest ... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John's tests seem to suggest that peak RAM could be as much as twice final RAM in calculating your key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Given this fact, might there be potential in trying to work around your hardware limitation in this case by creating a loop that loads, for example, only a month's worth of data a time, calculates your key using a hash (assuming you're willing to get over the mathematical offence), stores into a prefixed or suffixed qvd, and then drops the table before going around the loop again to load the next month etc etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This way you could calculate the keys you need in small chunks, and then load and concatenate the series of qvds created to build your data model seperately without needing to calculate your key all in one go.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't considered whether the final model would still be too big for your hardware to handle, but this way you might overcome the peak RAM overhead from calculating your key, and with a little luck that might be enough to get you on your way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course if, as Magnus suggests, you are able to get a key in the DW/DB that would also solve the problem of the key calculation overhead.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Sep 2011 15:11:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-huge-tables-with-4-fields-in-common/m-p/266448#M709856</guid>
      <dc:creator>dominicmander</dc:creator>
      <dc:date>2011-09-19T15:11:12Z</dc:date>
    </item>
  </channel>
</rss>

