<?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 AutoNumber() vs Auto..Hash() in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/AutoNumber-vs-Auto-Hash/m-p/768578#M272937</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you possibly help below clarifications: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The role of the counter (or AutoID) in AutoNumber((fieldname), (counter))&lt;/LI&gt;&lt;/UL&gt;&lt;P style="padding-left: 30px;"&gt;Further reading through google, it seems QlikView creates a counter during loading. When multiple autonumber is used for dimension tables, it seems we ought to put AutoID/Counter as unique ID for entire loading script. Is this correct understanding? But I wonder, is there any case where we really use the different AutoID/Counter? I do not understand why AutoId/Counter is needed. Would you please explain?&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The AutonumberHash128() - or 256&lt;/LI&gt;&lt;/UL&gt;&lt;P style="padding-left: 30px;"&gt;May I understand that AutoNumberHash128() generates arbitrary numbers based on the values instead of the load orders? &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;If so, the AutoNumberHash128() would be more superiour as our choice, since there is no chance of mixing-up counters. Particularly after data correction is made from the original OLTP data source (which already have primary keys), is there any advantage of using AutoNumber, risking potential mixed-up of the counter/AutoID?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would appreciate for your advices. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Dec 2014 18:09:30 GMT</pubDate>
    <dc:creator>atsushi_saijo</dc:creator>
    <dc:date>2014-12-19T18:09:30Z</dc:date>
    <item>
      <title>AutoNumber() vs Auto..Hash()</title>
      <link>https://community.qlik.com/t5/QlikView/AutoNumber-vs-Auto-Hash/m-p/768578#M272937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you possibly help below clarifications: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The role of the counter (or AutoID) in AutoNumber((fieldname), (counter))&lt;/LI&gt;&lt;/UL&gt;&lt;P style="padding-left: 30px;"&gt;Further reading through google, it seems QlikView creates a counter during loading. When multiple autonumber is used for dimension tables, it seems we ought to put AutoID/Counter as unique ID for entire loading script. Is this correct understanding? But I wonder, is there any case where we really use the different AutoID/Counter? I do not understand why AutoId/Counter is needed. Would you please explain?&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The AutonumberHash128() - or 256&lt;/LI&gt;&lt;/UL&gt;&lt;P style="padding-left: 30px;"&gt;May I understand that AutoNumberHash128() generates arbitrary numbers based on the values instead of the load orders? &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;If so, the AutoNumberHash128() would be more superiour as our choice, since there is no chance of mixing-up counters. Particularly after data correction is made from the original OLTP data source (which already have primary keys), is there any advantage of using AutoNumber, risking potential mixed-up of the counter/AutoID?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would appreciate for your advices. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Dec 2014 18:09:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AutoNumber-vs-Auto-Hash/m-p/768578#M272937</guid>
      <dc:creator>atsushi_saijo</dc:creator>
      <dc:date>2014-12-19T18:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: AutoNumber() vs Auto..Hash()</title>
      <link>https://community.qlik.com/t5/QlikView/AutoNumber-vs-Auto-Hash/m-p/768579#M272938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;here an example of counter usage in autonumber&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/message/464436#464436" title="http://community.qlik.com/message/464436#464436"&gt;http://community.qlik.com/message/464436#464436&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Dec 2014 18:26:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AutoNumber-vs-Auto-Hash/m-p/768579#M272938</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2014-12-19T18:26:34Z</dc:date>
    </item>
    <item>
      <title>Re: AutoNumber() vs Auto..Hash()</title>
      <link>https://community.qlik.com/t5/QlikView/AutoNumber-vs-Auto-Hash/m-p/768580#M272939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;and here an interesting post on hash in qlik&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.qlikfix.com/2014/03/11/hash-functions-collisions/" title="http://www.qlikfix.com/2014/03/11/hash-functions-collisions/"&gt;QlikView hash functions and collisions - The Qlik Fix! The Qlik Fix!&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Dec 2014 18:27:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AutoNumber-vs-Auto-Hash/m-p/768580#M272939</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2014-12-19T18:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: AutoNumber() vs Auto..Hash()</title>
      <link>https://community.qlik.com/t5/QlikView/AutoNumber-vs-Auto-Hash/m-p/768581#M272940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;AutoNumber() generates sequential integers, which is a very storage efficient data for QV. When autonumbering different key fields in the same script, you should use the AutoId parameter. This ensures that each field will have sequential numbers with no gaps. It's a common practice to use the fieldname as the AutoId. eg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AutoNumber(OrderID, '%OrderKey") as [%OrderKey]&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.63636302948px;"&gt;AutoNumber(InvoiceID, '%InvoiceKey") as [%&lt;SPAN style="font-size: 13.63636302948px;"&gt;InvoiceKey&lt;/SPAN&gt;]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another use case for the AutoId parm is when you are generating sequence numbers for a set. For example:&lt;/P&gt;&lt;P&gt;Ref&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amount&lt;/P&gt;&lt;P&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 100&lt;/P&gt;&lt;P&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 150&lt;/P&gt;&lt;P&gt;B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 75&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Autonumber(recno(), Ref) as Sequence&lt;/P&gt;&lt;P style="font-size: 13.63636302948px;"&gt;Ref&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amount&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sequence&lt;/P&gt;&lt;P style="font-size: 13.63636302948px;"&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 100&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P style="font-size: 13.63636302948px;"&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 150&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&lt;/P&gt;&lt;P style="font-size: 13.63636302948px;"&gt;B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 75&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P style="font-size: 13.63636302948px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.63636302948px;"&gt;The Hash* functions generate a long string derived from the input. Hash functions are deterministic, that is, given the same input, they will always produced the same output. AutoNumber() is non-deterministic.Output values are dependent on the load order of input. For that reason, Autonumbering of keys should only be done in the final qvw. Autonumbered keys should not be stored in QVDs or intermediate qvws.&lt;/P&gt;&lt;P style="font-size: 13.63636302948px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.63636302948px;"&gt;The AutoNumberHash*() functions combine hashing followed by autonumbering the hash value. Frankly, I've never found a reason to use the AutoNumberHash() functions. I use either AutoNumber() or Hash(), I can't think of a reason to combine them.&lt;/P&gt;&lt;P style="font-size: 13.63636302948px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.63636302948px;"&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Dec 2014 18:56:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AutoNumber-vs-Auto-Hash/m-p/768581#M272940</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2014-12-19T18:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: AutoNumber() vs Auto..Hash()</title>
      <link>https://community.qlik.com/t5/QlikView/AutoNumber-vs-Auto-Hash/m-p/768582#M272941</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Massimo, Thank you for the fast answer. I appreciated the two entries, and greatly improved my knowledge. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Dec 2014 13:34:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AutoNumber-vs-Auto-Hash/m-p/768582#M272941</guid>
      <dc:creator>atsushi_saijo</dc:creator>
      <dc:date>2014-12-22T13:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: AutoNumber() vs Auto..Hash()</title>
      <link>https://community.qlik.com/t5/QlikView/AutoNumber-vs-Auto-Hash/m-p/768583#M272942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Rob, I appreciate for the in-depth feedback. It clarified the usage. I also note that I am the ardent reader of your blog. It is such a pleasant surprise to receive from such a guru in QlikView.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Dec 2014 13:36:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AutoNumber-vs-Auto-Hash/m-p/768583#M272942</guid>
      <dc:creator>atsushi_saijo</dc:creator>
      <dc:date>2014-12-22T13:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: AutoNumber() vs Auto..Hash()</title>
      <link>https://community.qlik.com/t5/QlikView/AutoNumber-vs-Auto-Hash/m-p/768584#M272943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/2286"&gt;rwunderlich&lt;/A&gt;‌, there´s one situation when autonumberhash functions are more efficient&lt;/P&gt;&lt;P&gt;If you have to use a composite key, as autonumberhash functions use a comma separated parameter list they perform better than concatenating using "&amp;amp;"&lt;/P&gt;&lt;P&gt;I´ve made some tests (more explained &lt;A _jive_internal="true" href="https://community.qlik.com/groups/qlikview-brasil/blog/2017/09/20/autonumber-x-autonumberhash128-x-autonumberhash256-em-chaves-compostas"&gt;here&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;for short&lt;/P&gt;&lt;P&gt;Autonumberhash256(ID,Cod1,AnotherKey) perform much better than&lt;/P&gt;&lt;P&gt;Autonumber(&lt;SPAN style="font-size: 13.3333px;"&gt;ID&amp;amp;Cod1&amp;amp;AnotherKey)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;of course you can write &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Autonumber(hash256(ID,Cod1,AnotherKey)) but i think this could be slightly (not tested) slower&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Oct 2017 14:14:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AutoNumber-vs-Auto-Hash/m-p/768584#M272943</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2017-10-03T14:14:15Z</dc:date>
    </item>
  </channel>
</rss>

