<?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: Less resource intensive joins in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Less-resource-intensive-joins/m-p/449481#M113118</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/142145"&gt;@tomcmacdonald&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;In my experience SAS SQL is not great when trying to join many tables in a single SQL. Depending on what you want to do and especially what volumes and relationships between the tables you're dealing with, some tweaks to the SQL or a SAS data step can reduce resource consumption and/or improve performance a lot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In case this is one big table with a lot of lookups (i.e. a fact table with dimension and reference tables) then using a SAS data step with hash lookup tables can be much more efficient.&amp;nbsp;Logically left joins and coalesce() can also get implemented in a SAS data step.&lt;/P&gt;</description>
    <pubDate>Wed, 28 Mar 2018 19:50:15 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2018-03-28T19:50:15Z</dc:date>
    <item>
      <title>Less resource intensive joins</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Less-resource-intensive-joins/m-p/449424#M113093</link>
      <description>&lt;P&gt;I'm trying to join 17 tables together in SAS using PROC SQL and am running out of system resources.&amp;nbsp; All tables have a simple index on the joined field.&amp;nbsp; I'm thinking I can use the DATA STEP but I need to mimic COALESCE and left joins.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Mar 2018 16:45:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Less-resource-intensive-joins/m-p/449424#M113093</guid>
      <dc:creator>tomcmacdonald</dc:creator>
      <dc:date>2018-03-28T16:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Less resource intensive joins</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Less-resource-intensive-joins/m-p/449426#M113094</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/142145"&gt;@tomcmacdonald&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;I'm trying to join 17 tables together in SAS using PROC SQL and am running out of system resources.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Are you joining all in single query or multiple queries?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Mar 2018 16:47:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Less-resource-intensive-joins/m-p/449426#M113094</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-03-28T16:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: Less resource intensive joins</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Less-resource-intensive-joins/m-p/449427#M113095</link>
      <description>In a single query.</description>
      <pubDate>Wed, 28 Mar 2018 16:48:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Less-resource-intensive-joins/m-p/449427#M113095</guid>
      <dc:creator>tomcmacdonald</dc:creator>
      <dc:date>2018-03-28T16:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: Less resource intensive joins</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Less-resource-intensive-joins/m-p/449474#M113115</link>
      <description>&lt;P&gt;Now I'm trying to run the code in UNIX batch mode and specifying -MEMSIZE MAX and -WORK &amp;lt;some directory&amp;gt; system options.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Mar 2018 19:32:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Less-resource-intensive-joins/m-p/449474#M113115</guid>
      <dc:creator>tomcmacdonald</dc:creator>
      <dc:date>2018-03-28T19:32:14Z</dc:date>
    </item>
    <item>
      <title>Re: Less resource intensive joins</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Less-resource-intensive-joins/m-p/449481#M113118</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/142145"&gt;@tomcmacdonald&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;In my experience SAS SQL is not great when trying to join many tables in a single SQL. Depending on what you want to do and especially what volumes and relationships between the tables you're dealing with, some tweaks to the SQL or a SAS data step can reduce resource consumption and/or improve performance a lot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In case this is one big table with a lot of lookups (i.e. a fact table with dimension and reference tables) then using a SAS data step with hash lookup tables can be much more efficient.&amp;nbsp;Logically left joins and coalesce() can also get implemented in a SAS data step.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Mar 2018 19:50:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Less-resource-intensive-joins/m-p/449481#M113118</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-03-28T19:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: Less resource intensive joins</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Less-resource-intensive-joins/m-p/449488#M113122</link>
      <description>If it's a fact-dim reconstruction, I'm a fan of formats as well. They also tend to come in handy in other areas so you may even have them built already.&lt;BR /&gt;</description>
      <pubDate>Wed, 28 Mar 2018 20:11:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Less-resource-intensive-joins/m-p/449488#M113122</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-03-28T20:11:19Z</dc:date>
    </item>
    <item>
      <title>Re: Less resource intensive joins</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Less-resource-intensive-joins/m-p/449597#M113164</link>
      <description>&lt;P&gt;The problem here is the left joins, since SAS (and other) can optimize the as god as inner joins.&lt;/P&gt;
&lt;P&gt;Usually when creating star schemas, dimension values that are missing can be assigned a dummy value, like a dimsnion key -1. Then you can switch to inner joins.&lt;/P&gt;
&lt;P&gt;If your data is in Base SAS libraries consider moving to SPDE, which has better index management and some additional use cases for index use in the where planner.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Mar 2018 08:29:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Less-resource-intensive-joins/m-p/449597#M113164</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2018-03-29T08:29:18Z</dc:date>
    </item>
  </channel>
</rss>

