<?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: optimized code for cartesian product in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/optimized-code-for-cartesian-product/m-p/875247#M345823</link>
    <description>&lt;P&gt;Are both tables huge?&lt;/P&gt;
&lt;P&gt;If not, the smaller table may fit into memory and then you could use the hash object in the datastep/proc ds2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 11 May 2023 15:09:01 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2023-05-11T15:09:01Z</dc:date>
    <item>
      <title>optimized code for cartesian product</title>
      <link>https://communities.sas.com/t5/SAS-Programming/optimized-code-for-cartesian-product/m-p/875201#M345813</link>
      <description>&lt;P&gt;What is better way of doing this which takes less processing time? My actual data is huge and since below code produces cartesian product it is taking very large amount of time for processing.Below is sampel data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data one ;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;id name $;&lt;/P&gt;&lt;P&gt;100 sam&lt;/P&gt;&lt;P&gt;200 ram&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data two ;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;id name $;&lt;/P&gt;&lt;P&gt;100 sam&lt;/P&gt;&lt;P&gt;200 ram&lt;/P&gt;&lt;P&gt;300 paul&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Proc sql;&lt;/P&gt;&lt;P&gt;create table temp as&lt;/P&gt;&lt;P&gt;select b.id,b.name from&amp;nbsp;&lt;/P&gt;&lt;P&gt;one a,&lt;/P&gt;&lt;P&gt;two b&lt;/P&gt;&lt;P&gt;where a.id NE b.id;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2023 13:18:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/optimized-code-for-cartesian-product/m-p/875201#M345813</guid>
      <dc:creator>Sathya3</dc:creator>
      <dc:date>2023-05-11T13:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: optimized code for cartesian product</title>
      <link>https://communities.sas.com/t5/SAS-Programming/optimized-code-for-cartesian-product/m-p/875202#M345814</link>
      <description>&lt;P&gt;A very recent and long thread on Cartesian joins&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/NOTE-The-execution-of-this-query-involves-performing-one-or-more/m-p/873367" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/SAS-Programming/NOTE-The-execution-of-this-query-involves-performing-one-or-more/m-p/873367&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Basically, if it has to be a Cartesian join, you can't optimize it and you can't speed it up. So the real question is ... can this be done without a Cartesian join? Please let us know.&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2023 13:55:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/optimized-code-for-cartesian-product/m-p/875202#M345814</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-05-11T13:55:55Z</dc:date>
    </item>
    <item>
      <title>Re: optimized code for cartesian product</title>
      <link>https://communities.sas.com/t5/SAS-Programming/optimized-code-for-cartesian-product/m-p/875247#M345823</link>
      <description>&lt;P&gt;Are both tables huge?&lt;/P&gt;
&lt;P&gt;If not, the smaller table may fit into memory and then you could use the hash object in the datastep/proc ds2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2023 15:09:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/optimized-code-for-cartesian-product/m-p/875247#M345823</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2023-05-11T15:09:01Z</dc:date>
    </item>
    <item>
      <title>Re: optimized code for cartesian product</title>
      <link>https://communities.sas.com/t5/SAS-Programming/optimized-code-for-cartesian-product/m-p/875292#M345847</link>
      <description>&lt;P&gt;What operation are you trying to perform (in words).&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2023 17:10:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/optimized-code-for-cartesian-product/m-p/875292#M345847</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2023-05-11T17:10:09Z</dc:date>
    </item>
  </channel>
</rss>

