<?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: Join eating up all available resources in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Join-eating-up-all-available-resources/m-p/496373#M131266</link>
    <description>&lt;P&gt;OK, I figured it out, this was my mistake.&amp;nbsp; It was forming a cartesian product because I forgot to throw out rows with a NULL variable that it was being joined on.&amp;nbsp; Thanks for the help everyone.&lt;/P&gt;</description>
    <pubDate>Mon, 17 Sep 2018 19:09:43 GMT</pubDate>
    <dc:creator>tomcmacdonald</dc:creator>
    <dc:date>2018-09-17T19:09:43Z</dc:date>
    <item>
      <title>Join eating up all available resources</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-eating-up-all-available-resources/m-p/496308#M131217</link>
      <description>&lt;P&gt;&amp;nbsp;It has worked in the past and now suddenly my code is broken. I'm performing a join between ~20 tables with around 1-50k rows each.&amp;nbsp; All tables have an index and are sorted.&amp;nbsp; The join is performed using PROC SQL.&amp;nbsp; It's requiring hundreds of GB's before taking up all available resources and throwing an error once everything is exhausted.&amp;nbsp; I'm trying to see if there's a cartesian product being mistakenly created and there are none.&amp;nbsp; What are my options?&amp;nbsp; Must I refactor this to be done with PROC SORT's and DATA steps?&lt;/P&gt;</description>
      <pubDate>Mon, 17 Sep 2018 17:06:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-eating-up-all-available-resources/m-p/496308#M131217</guid>
      <dc:creator>tomcmacdonald</dc:creator>
      <dc:date>2018-09-17T17:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: Join eating up all available resources</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-eating-up-all-available-resources/m-p/496319#M131228</link>
      <description>&lt;P&gt;Did you check some of the basic performance considerations for your query like WHERE clause, KEEP or DROP, indexed datasets.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Sep 2018 17:18:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-eating-up-all-available-resources/m-p/496319#M131228</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2018-09-17T17:18:17Z</dc:date>
    </item>
    <item>
      <title>Re: Join eating up all available resources</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-eating-up-all-available-resources/m-p/496322#M131230</link>
      <description>&lt;P&gt;How would I go about doing that?&amp;nbsp; For this query there is no WHERE clause.&amp;nbsp; And isn't KEEP and DROP specific to the DATA step and not PROC SQL?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Sep 2018 17:21:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-eating-up-all-available-resources/m-p/496322#M131230</guid>
      <dc:creator>tomcmacdonald</dc:creator>
      <dc:date>2018-09-17T17:21:56Z</dc:date>
    </item>
    <item>
      <title>Re: Join eating up all available resources</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-eating-up-all-available-resources/m-p/496336#M131243</link>
      <description>&lt;P&gt;You can use KEEP or DROP or SELECT Clause in your query for keeping only the columns that you need.&lt;/P&gt;
&lt;P&gt;Keep drop can also be used in proc sql&lt;/P&gt;
&lt;P&gt;proc sql;&lt;BR /&gt;select * &lt;BR /&gt;from sashelp.class(keep= Name Sex);&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also another consideration is avoid heterogeneous joins if possible. Where are your tables located? and share your sample query.&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Sep 2018 17:44:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-eating-up-all-available-resources/m-p/496336#M131243</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2018-09-17T17:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: Join eating up all available resources</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-eating-up-all-available-resources/m-p/496341#M131246</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
  create table report as 
  select
    a.id,
    a.col1,
    a.col2,
    b.col4
    case when
        c.col5 is not null then 1
    end as col5
    ...
    z.col30
  from
    a
    left join b on a.id = b.id
    ...
    left join z on a.id = z.id;
quit; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The query looks something like that.&amp;nbsp; Some tables are in work and some are in other libraries.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Sep 2018 17:48:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-eating-up-all-available-resources/m-p/496341#M131246</guid>
      <dc:creator>tomcmacdonald</dc:creator>
      <dc:date>2018-09-17T17:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: Join eating up all available resources</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-eating-up-all-available-resources/m-p/496360#M131258</link>
      <description>&lt;P&gt;If you do not have a many-to-many relationship and therefore do not need to build a cartesian join, switch to sorting and merging in a data step.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Sep 2018 18:26:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-eating-up-all-available-resources/m-p/496360#M131258</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-09-17T18:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: Join eating up all available resources</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-eating-up-all-available-resources/m-p/496373#M131266</link>
      <description>&lt;P&gt;OK, I figured it out, this was my mistake.&amp;nbsp; It was forming a cartesian product because I forgot to throw out rows with a NULL variable that it was being joined on.&amp;nbsp; Thanks for the help everyone.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Sep 2018 19:09:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-eating-up-all-available-resources/m-p/496373#M131266</guid>
      <dc:creator>tomcmacdonald</dc:creator>
      <dc:date>2018-09-17T19:09:43Z</dc:date>
    </item>
  </channel>
</rss>

