Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
brindlogcool
Creator III
Creator III

Difference between autonumberhash128,autonumberhash256 and autonumber

Hi ,

What is the difference between autonumberhash128,autonumberhash256 and autonumber functions?

As per the help it is given the same definition for all the three functions.

This function can be used e.g. for creating a compact memory representation of a complex key.

Please share your inputs.

4 Replies
Gysbert_Wassenaar

Autonumber needs one expression as input and autonumberhashXXX can handle more inputs. So you'd use autonumber(Field1&Field2&Field3) which needs to calculate the concatenation of Field1,-2 and -3 first. Autonumberhash can take more inputs: autonumberhash128(Field1, Field2, Field3). More importantly the autonumberhash are likely more efficient in determining if the combined inputs have already been encountered or are encountered for the first time. So they are probably faster in calculating the unique integer.


talk is cheap, supply exceeds demand
schurter
Creator
Creator

Dear Gysbert,

Thanks for the statement - but what's then the difference between AutoNumberHash128 and AutoNumberHash256

Best, Marlies

swuehl
MVP
MVP

Marlies,

the hash function maps data of arbitrary size to data of fixed size.

The difference between Hash128 and Hash256 is just the fixed size of the output range values, i.e. Hash256 allows more distinct values to map to, fewer collisions (input mapped to same output value).

But it will also consume more memory to store the hash values (but since these values are then Autonumber'ed, it doesn't really matter).

schurter
Creator
Creator

Stefan, OK, thank for the answer!

Best, Marlies