Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everyone,
I am in the process of improving one of my dashboards. After reading Memory sizes for data types | Qlikview Cookbook posted by rwunderlich wanted to test by myself the size per distinct symbol varies also for the decimals. In order to do that i created the following script that is generating 2.000.000 of random numbers with 1 to 20 digits integer/decimal:
Let vNRegisters = 2*pow(10,6);
Decimals:
LOAD RowNo() as NRow, Round(Rand(),1) as 'Decimal'
AutoGenerate($(vNRegisters));
Integers:
LOAD RowNo() as NRow, Round(Rand()*pow(10,$(vIT)),1) as 'Integer'
AutoGenerate($(vNRegisters));
For vIT=2 to 20
left Join(Decimals)
LOAD RowNo() as NRow, Round(Rand(),1/pow(10,$(vIT))) as 'Decimal$(vIT)'
AutoGenerate($(vNRegisters));
left Join(Integers)
LOAD RowNo() as NRow, Round(Rand()*pow(10,$(vIT)),1) as 'Integer$(vIT)'
AutoGenerate($(vNRegisters));
next
The Output is like:
Nrow | Decimal1 | Decimal2 | Decimal3 | Decimal4 | Decimal5 |
---|---|---|---|---|---|
1 | 0.1 | 0.13 | 0.284 | 0.5547 | 0.5555 |
2 | 0.1 | 0.22 | 0.458 | 0.4778 | 0.3336 |
After That I extacted the mem file I found that the size per distinct symbol is 8 bytes! No matter the number of digits. Possibly I am doing something Wrong, can anyone please clarify me what is happening.
Here I attach the mem file and the QV with the script.
Message was edited by: Eric Vilarrasa
Your observation is correct - each pure number without any formatting will consume 8 bytes unless the fieldvalues will be consecutive. For more to this topic see here:
ByteSizes from Values in QlikView
- Marcus
Your observation is correct - each pure number without any formatting will consume 8 bytes unless the fieldvalues will be consecutive. For more to this topic see here:
ByteSizes from Values in QlikView
- Marcus