<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Size of Varibles in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Size-of-Varibles/m-p/69149#M604659</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am in the process of improving one of my dashboards. After reading &lt;A href="http://qlikviewcookbook.com/2008/05/memory-sizes-for-data-types/" title="http://qlikviewcookbook.com/2008/05/memory-sizes-for-data-types/"&gt;Memory sizes for data types | Qlikview Cookbook&lt;/A&gt;‌&amp;nbsp; posted by &lt;A href="https://community.qlik.com/qlik-users/2286"&gt;rwunderlich&lt;/A&gt; 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:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_15242126096797623" jivemacro_uid="_15242126096797623"&gt;
&lt;P&gt;Let vNRegisters = 2*pow(10,6);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Decimals:&lt;/P&gt;
&lt;P&gt;LOAD RowNo() as NRow, Round(Rand(),1) as 'Decimal'&lt;/P&gt;
&lt;P&gt;AutoGenerate($(vNRegisters));&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Integers:&lt;/P&gt;
&lt;P&gt;LOAD RowNo() as NRow, Round(Rand()*pow(10,$(vIT)),1) as 'Integer'&lt;/P&gt;
&lt;P&gt;AutoGenerate($(vNRegisters));&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;For vIT=2 to 20&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;left Join(Decimals)&lt;/P&gt;
&lt;P&gt;LOAD RowNo() as NRow, Round(Rand(),1/pow(10,$(vIT))) as 'Decimal$(vIT)'&lt;/P&gt;
&lt;P&gt;AutoGenerate($(vNRegisters));&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;left Join(Integers)&lt;/P&gt;
&lt;P&gt;LOAD RowNo() as NRow, Round(Rand()*pow(10,$(vIT)),1) as 'Integer$(vIT)'&lt;/P&gt;
&lt;P&gt;AutoGenerate($(vNRegisters));&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;next&lt;/P&gt;



&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Output is like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Nrow&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Decimal1&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Decimal2&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Decimal3&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Decimal4&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Decimal5&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0.1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0.13&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0.284&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0.5547&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0.5555&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0.1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0.22&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0.458&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0.4778&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0.3336&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After That I extacted the mem file I found that the size per distinct symbol is&lt;SPAN style="font-size: 12pt;"&gt; &lt;STRONG&gt;8 bytes!&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG&gt;No matter the number of digits&lt;/STRONG&gt;. Possibly I am doing something Wrong, can anyone please clarify me what is happening.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here I attach the mem file and the QV with the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Eric Vilarrasa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Apr 2018 08:45:33 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-04-20T08:45:33Z</dc:date>
    <item>
      <title>Size of Varibles</title>
      <link>https://community.qlik.com/t5/QlikView/Size-of-Varibles/m-p/69149#M604659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am in the process of improving one of my dashboards. After reading &lt;A href="http://qlikviewcookbook.com/2008/05/memory-sizes-for-data-types/" title="http://qlikviewcookbook.com/2008/05/memory-sizes-for-data-types/"&gt;Memory sizes for data types | Qlikview Cookbook&lt;/A&gt;‌&amp;nbsp; posted by &lt;A href="https://community.qlik.com/qlik-users/2286"&gt;rwunderlich&lt;/A&gt; 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:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_15242126096797623" jivemacro_uid="_15242126096797623"&gt;
&lt;P&gt;Let vNRegisters = 2*pow(10,6);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Decimals:&lt;/P&gt;
&lt;P&gt;LOAD RowNo() as NRow, Round(Rand(),1) as 'Decimal'&lt;/P&gt;
&lt;P&gt;AutoGenerate($(vNRegisters));&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Integers:&lt;/P&gt;
&lt;P&gt;LOAD RowNo() as NRow, Round(Rand()*pow(10,$(vIT)),1) as 'Integer'&lt;/P&gt;
&lt;P&gt;AutoGenerate($(vNRegisters));&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;For vIT=2 to 20&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;left Join(Decimals)&lt;/P&gt;
&lt;P&gt;LOAD RowNo() as NRow, Round(Rand(),1/pow(10,$(vIT))) as 'Decimal$(vIT)'&lt;/P&gt;
&lt;P&gt;AutoGenerate($(vNRegisters));&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;left Join(Integers)&lt;/P&gt;
&lt;P&gt;LOAD RowNo() as NRow, Round(Rand()*pow(10,$(vIT)),1) as 'Integer$(vIT)'&lt;/P&gt;
&lt;P&gt;AutoGenerate($(vNRegisters));&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;next&lt;/P&gt;



&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Output is like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Nrow&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Decimal1&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Decimal2&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Decimal3&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Decimal4&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Decimal5&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0.1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0.13&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0.284&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0.5547&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0.5555&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0.1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0.22&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0.458&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0.4778&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0.3336&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After That I extacted the mem file I found that the size per distinct symbol is&lt;SPAN style="font-size: 12pt;"&gt; &lt;STRONG&gt;8 bytes!&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG&gt;No matter the number of digits&lt;/STRONG&gt;. Possibly I am doing something Wrong, can anyone please clarify me what is happening.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here I attach the mem file and the QV with the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Eric Vilarrasa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2018 08:45:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Size-of-Varibles/m-p/69149#M604659</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-20T08:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: Size of Varibles</title>
      <link>https://community.qlik.com/t5/QlikView/Size-of-Varibles/m-p/69150#M604660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-17228"&gt;ByteSizes from Values in QlikView&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2018 13:17:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Size-of-Varibles/m-p/69150#M604660</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-04-20T13:17:07Z</dc:date>
    </item>
  </channel>
</rss>

