Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

cancel
Showing results for 
Search instead for 
Did you mean: 
ericarru
Creator
Creator

Size of Varibles

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:

NrowDecimal1Decimal2Decimal3Decimal4Decimal5
10.10.130.2840.55470.5555
20.10.220.4580.47780.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

1 Solution

Accepted Solutions
marcus_sommer
MVP & Luminary
MVP & Luminary

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

View solution in original post

1 Reply
marcus_sommer
MVP & Luminary
MVP & Luminary

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