Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
QFanatic
Creator
Creator

Autonumber in Script

hi all,

so as I understand I cannot use AutonumberHash if the data gets reloaded in 2 separate reloads. What I've seen from Help files is that I should use Hash128 etc, but that returns fields that are very long...

What do you do guys generally do to get a persistent value across loads?

 

Thanks

Labels (1)
13 Replies
marcus_sommer

By an autonumber the field-value = pointer-value and therefore the field-value don't need to be stored and the pointer is a bit-stuffed numeric value. Compared with a large string-value it's much smaller.

But it depends on the ratio of the number of distinct values against the number of records and also the number of fields within the table how significantly this optimization is. As far as you don't hit any bottleneck within your environment such measures need to be balanced against the efforts. If you save at least 10% of the file-size you may implement such logic and if it's just a few percent you could put it on the todo-list for later - usually never done ...

- Marcus

QFanatic
Creator
Creator
Author

Thank you.
marcus_sommer

Just one addition. Because on the fact that you don't need the real values of this field else just an autonumber from it as a key you may consider to drop the key also by changing your datamodel, for example by:

  • mapping/joining the information from the linked dimension-table
  • concatenating the information if multiple fact-tables are associated

The aim should be to develop the datamodel to get a star-scheme or even one (big) single table because these approaches have performance-benefits within the UI which are usually much more important as advantages in regard to the storages-space or the script run-times. Quite common but especially by large datasets the worst is the use of link-table datamodels. 

- Marcus

QFanatic
Creator
Creator
Author

Great info thank you Marcus