<?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 Re: excessive increase in table sizing in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/excessive-increase-in-table-sizing/m-p/879916#M347604</link>
    <description>&lt;P&gt;this is the code. I also report the data from the dictionary columns of the 2 tables in question&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql; 
create table RUOLO_DANNI2  as
select RU.* 
      ,C.DES_EDWH as RUOLO_DES
from RUOLO_DANNI1 RU
  left join  EDWH_ODS.CODICE_TIPO_RUOLO C
     on 
             RU.COD_TIPO_RUOLO = C.COD_EDWH 
			 and C.ts_inizio_validita  &amp;lt;= ru.ts_inizio_validita &amp;lt;=  C.ts_fine_validita
             and compress(C.cod_source)='1';
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2023 17:07:01 GMT</pubDate>
    <dc:creator>mariopellegrini</dc:creator>
    <dc:date>2023-06-09T17:07:01Z</dc:date>
    <item>
      <title>excessive increase in table sizing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/excessive-increase-in-table-sizing/m-p/879901#M347601</link>
      <description>&lt;P&gt;I have a table sizing problem that I don't understand. doing a simple left join with a small table i added a variable to a table. The strange thing is that this new table with an extra variable (13 instead of 12) has gone from 8.54Gb to 21.17Gb! I can't figure it out, I think the physical memory should have increased only a little.&lt;/P&gt;
&lt;P&gt;I report the complete results of the dictionary of the 2 tables in question (note the "filesize" variable)&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 16:55:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/excessive-increase-in-table-sizing/m-p/879901#M347601</guid>
      <dc:creator>mariopellegrini</dc:creator>
      <dc:date>2023-06-09T16:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: excessive increase in table sizing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/excessive-increase-in-table-sizing/m-p/879908#M347602</link>
      <description>What is the length of the new character variable added? &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 09 Jun 2023 16:59:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/excessive-increase-in-table-sizing/m-p/879908#M347602</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-06-09T16:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: excessive increase in table sizing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/excessive-increase-in-table-sizing/m-p/879915#M347603</link>
      <description>&lt;P&gt;Show the code for your "simple join".&amp;nbsp; It is likely that you added records, at a guess about doubling the number of records, because of the particular join.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Consider this small example. A "simple join" of two data sets of 6 observations each but the result has 16 observations.&lt;/P&gt;
&lt;PRE&gt;data one;
  input a b;
datalines;
1  1
1  2
1  3
2  11
2  22
3  33
;

data two;
  input a z;
datalines;
1 111
1 222
1 333
2 1111
2 2222
2 3333
;

proc sql;
    create table example as
    select one.a, one.b, two.z
    from one 
         left join
         two 
         on one.a = two.a
   ;
quit;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Table size for many discussions is more about the number of observations and variables than bytes.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 17:03:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/excessive-increase-in-table-sizing/m-p/879915#M347603</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-06-09T17:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: excessive increase in table sizing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/excessive-increase-in-table-sizing/m-p/879916#M347604</link>
      <description>&lt;P&gt;this is the code. I also report the data from the dictionary columns of the 2 tables in question&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql; 
create table RUOLO_DANNI2  as
select RU.* 
      ,C.DES_EDWH as RUOLO_DES
from RUOLO_DANNI1 RU
  left join  EDWH_ODS.CODICE_TIPO_RUOLO C
     on 
             RU.COD_TIPO_RUOLO = C.COD_EDWH 
			 and C.ts_inizio_validita  &amp;lt;= ru.ts_inizio_validita &amp;lt;=  C.ts_fine_validita
             and compress(C.cod_source)='1';
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 17:07:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/excessive-increase-in-table-sizing/m-p/879916#M347604</guid>
      <dc:creator>mariopellegrini</dc:creator>
      <dc:date>2023-06-09T17:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: excessive increase in table sizing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/excessive-increase-in-table-sizing/m-p/879918#M347605</link>
      <description>&lt;P&gt;&lt;FONT style="vertical-align: inherit;"&gt;&lt;FONT style="vertical-align: inherit;"&gt;200&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 17:08:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/excessive-increase-in-table-sizing/m-p/879918#M347605</guid>
      <dc:creator>mariopellegrini</dc:creator>
      <dc:date>2023-06-09T17:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: excessive increase in table sizing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/excessive-increase-in-table-sizing/m-p/879919#M347606</link>
      <description>&lt;P&gt;You added 200 bytes to your obslen, indicating that the new variable is $200 in length. This usually happens when the new variable is assigned a value from a function without properly defining it beforehand with a LENGTH statement.&lt;/P&gt;
&lt;P&gt;Please show your code.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 17:10:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/excessive-increase-in-table-sizing/m-p/879919#M347606</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-06-09T17:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: excessive increase in table sizing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/excessive-increase-in-table-sizing/m-p/879925#M347610</link>
      <description>&lt;P&gt;Then yes, that is correct.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have 67,298,471 observations X 200 characters/bytes =&amp;nbsp;13,459,694,200 bytes = 13.5 GB&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 17:22:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/excessive-increase-in-table-sizing/m-p/879925#M347610</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-06-09T17:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: excessive increase in table sizing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/excessive-increase-in-table-sizing/m-p/879936#M347619</link>
      <description>&lt;P&gt;I simply brought the variable forward from another table without specifying the length, thus inheriting the original length&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql; 
create table RUOLO_DANNI2  as
select RU.* 
      ,C.DES_EDWH as RUOLO_DES
from RUOLO_DANNI1 RU
  left join  EDWH_ODS.CODICE_TIPO_RUOLO C
     on 
             RU.COD_TIPO_RUOLO = C.COD_EDWH 
			 and C.ts_inizio_validita  &amp;lt;= ru.ts_inizio_validita &amp;lt;=  C.ts_fine_validita
             and compress(C.cod_source)='1';
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Jun 2023 17:57:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/excessive-increase-in-table-sizing/m-p/879936#M347619</guid>
      <dc:creator>mariopellegrini</dc:creator>
      <dc:date>2023-06-09T17:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: excessive increase in table sizing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/excessive-increase-in-table-sizing/m-p/879945#M347622</link>
      <description>,C.DES_EDWH as RUOLO_DES LENGTH=$20 &lt;BR /&gt;&lt;BR /&gt;Or whatever makes sense for you to try and reduce the size.</description>
      <pubDate>Fri, 09 Jun 2023 18:54:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/excessive-increase-in-table-sizing/m-p/879945#M347622</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-06-09T18:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: excessive increase in table sizing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/excessive-increase-in-table-sizing/m-p/879946#M347623</link>
      <description>&lt;P&gt;Well, an almost tripling of the observation size will also result in tripling the dataset size.&lt;/P&gt;
&lt;P&gt;Use the COMPRESS=YES dataset option if the new variable is mostly empty.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 18:56:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/excessive-increase-in-table-sizing/m-p/879946#M347623</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-06-09T18:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: excessive increase in table sizing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/excessive-increase-in-table-sizing/m-p/879947#M347624</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use the COMPRESS=YES system option (or COMPRESS=YES dataset option if you only want it to apply to one dataset) and it will take a lot less space on the disk.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why attach a spreadsheet to share 8 numbers?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="456"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="106"&gt;memname&lt;/TD&gt;
&lt;TD width="79"&gt;&amp;nbsp;nobs&amp;nbsp;&lt;/TD&gt;
&lt;TD width="54"&gt;&amp;nbsp;obslen&amp;nbsp;&lt;/TD&gt;
&lt;TD width="41"&gt;&amp;nbsp;nvar&amp;nbsp;&lt;/TD&gt;
&lt;TD width="71"&gt;&amp;nbsp;compress&amp;nbsp;&lt;/TD&gt;
&lt;TD width="105"&gt;&amp;nbsp;filesize&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;RUOLO_DANNI1&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp; 67,298,471&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 136&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;NO&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9,169,469,440&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;RUOLO_DANNI2&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp; 67,298,471&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 336&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 13&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;NO&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp; 22,734,503,936&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Fri, 09 Jun 2023 19:03:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/excessive-increase-in-table-sizing/m-p/879947#M347624</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-06-09T19:03:52Z</dc:date>
    </item>
  </channel>
</rss>

