Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Folks,
Appreciate your time. Looking for an information regarding autonumbers.,my app is around 20GB which has a lot of keys.,now I am trying to replace some of the keys with autonumbers and see reduction in app size. My question is which is the best to get used between Autonumber,Autonumber128 and 256.,is there any recommendation with respect to size reduction.,looking forward to hearing from you.,
thanks a lot!
Kiruthiga
Hi @SKiruthiga , one thing is check your source data, this is important to choose the proper function.
Please check the related help :
You can only connect autonumber keys that have been generated in the same data load, as the integer is generated according to the order the table is read. If you need to use keys that are persistent between data loads, independent of source data sorting, you should use the hash128, hash160 or hash256 functions.
The recommended method to autonumber keys is to use AutoNumber statement at the end of your script. This is much faster than any of the AutoNumber() functions.
AutoNumber myKeyField;
-Rob
Hello Rob,
Thank you,but unfortunately the app size is not reducing a much with both Autonumber funtion/Autonumber statement at the end of script.
for eg, My app size with out auto number : 19394.53 MB
with autonumber function: 19192.75 MB
with autonumber statement: 19046.97 MB
Is there any other approach you could recommend to reduce the app size? I am running behind for a solution.,thank you so much!
Kiruthiga
Use QS Document Analyzer to identify unused fields and then drop those fields from the model .
-Rob
This one comment saved me few times already. It is not well documented officially (or I struggle to find it) how to use AutoNumer outside of LOAD statements. Thanks Rob!
Hi @AnthonyM ,
This is how you can use AutoNumber outside your Load Statement:
[us-cities-reduced]:
LOAD
// Key fields
id AS %CityId,
// Regular fields
name,
state
FROM
[lib://IPC DevOps:DataFiles/us-cities-reduced.qvd](qvd)
;
[us-cities-zip-codes]:
LOAD
// Key fields
id AS %CityId,
// Regular fields
zip_code
FROM
[lib://IPC DevOps:DataFiles/us-cities-zip-codes.qvd](qvd)
;
Autonumber '%*';
You can create any naming convention for your key fields. In my example, I'm saying that all my key fields start with % and ends with whatever else, that is why the '%*'. You could say, for example, my key fields start with @ and ends with Key. In this case will AutoNumber '@*Key'.
Regards,
Mark Costa
Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com
Hi @marksouzacosta , that was more than I was hoping for.
Thank you!
I also endorse the use of autonumber at the end of script.
It is fast to implement, it executes fast (does not break any optimised loads from QVD), and it is easy to turn it on/off for troubleshooting purposes (either by en exit script just before or a simple line comment)