<?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: How to work efficiently with large SAS tables on a Oracle server in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-work-efficiently-with-large-SAS-tables-on-a-Oracle-server/m-p/770980#M244588</link>
    <description>&lt;P&gt;both are on Oracle and it is not indexed on the col_a.&lt;/P&gt;&lt;P&gt;there are many different columns that i would have to look for using this where col_a in (select col_b from table_b) so i dont know if can reindex on multiple columns.&lt;/P&gt;&lt;P&gt;sorry for the wrong code. still relatively new to SAS&lt;/P&gt;</description>
    <pubDate>Tue, 28 Sep 2021 18:09:20 GMT</pubDate>
    <dc:creator>aasdfafafsdfsaf</dc:creator>
    <dc:date>2021-09-28T18:09:20Z</dc:date>
    <item>
      <title>How to work efficiently with large SAS tables on a Oracle server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-work-efficiently-with-large-SAS-tables-on-a-Oracle-server/m-p/770958#M244577</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Im working with large datasets on a Oracle server and i was wondering what was the most efficient way of finding observations in one dataset [A] (100m rows,20columns) in another dataset column [B] (3m rows)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the code that i have right now is extremely slow and puts a heavy strain on the server, not to mention the file size limitation.&lt;/P&gt;&lt;P&gt;here is the code i have, that i want to make faster&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table want_table&lt;/P&gt;&lt;P&gt;as select * from table_a where&lt;/P&gt;&lt;P&gt;table_a_col in (select col_in_table_b);&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sorry if it's vague. I'll try to be as clear as possible in the comments.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 17:18:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-work-efficiently-with-large-SAS-tables-on-a-Oracle-server/m-p/770958#M244577</guid>
      <dc:creator>aasdfafafsdfsaf</dc:creator>
      <dc:date>2021-09-28T17:18:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to work efficiently with large SAS tables on a Oracle server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-work-efficiently-with-large-SAS-tables-on-a-Oracle-server/m-p/770971#M244585</link>
      <description>Are both these tables on the Oracle Server or is one local?&lt;BR /&gt;&lt;BR /&gt;And is your Oracle server indexed on table_a_col? &lt;BR /&gt;&lt;BR /&gt;That query looks incomplete so showing actual code is likely useful. If you're using tables from different systems, ie Oracle and SAS or different Oracle DB then this will be slow.</description>
      <pubDate>Tue, 28 Sep 2021 17:47:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-work-efficiently-with-large-SAS-tables-on-a-Oracle-server/m-p/770971#M244585</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-09-28T17:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to work efficiently with large SAS tables on a Oracle server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-work-efficiently-with-large-SAS-tables-on-a-Oracle-server/m-p/770975#M244586</link>
      <description>&lt;P&gt;If these are in fact two different databases, then SAS will be forced to move eligible records from each into the SAS session in order to complete the JOIN.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If these are two tables from the same Oracle database, or same server but different schemas, then might be better to use PROC SQL CONNECT to use explicit passthrough -- sending the commands directly to the database for processing -- rather than allowing SAS PROC SQL to try and figure out how to satisfy the query.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that's not possible, then it might be better to bring the smaller table into SAS (or the subset you are likely to need), and upload it to a scratch area on the other database, then join those to get the final result.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 18:00:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-work-efficiently-with-large-SAS-tables-on-a-Oracle-server/m-p/770975#M244586</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2021-09-28T18:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to work efficiently with large SAS tables on a Oracle server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-work-efficiently-with-large-SAS-tables-on-a-Oracle-server/m-p/770980#M244588</link>
      <description>&lt;P&gt;both are on Oracle and it is not indexed on the col_a.&lt;/P&gt;&lt;P&gt;there are many different columns that i would have to look for using this where col_a in (select col_b from table_b) so i dont know if can reindex on multiple columns.&lt;/P&gt;&lt;P&gt;sorry for the wrong code. still relatively new to SAS&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 18:09:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-work-efficiently-with-large-SAS-tables-on-a-Oracle-server/m-p/770980#M244588</guid>
      <dc:creator>aasdfafafsdfsaf</dc:creator>
      <dc:date>2021-09-28T18:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to work efficiently with large SAS tables on a Oracle server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-work-efficiently-with-large-SAS-tables-on-a-Oracle-server/m-p/770982#M244590</link>
      <description>&lt;P&gt;they will be both in the same oracle server or one local(3m) and one on the oracle server(100M). is there anything specific i can google to get a more precise search result for this issue? thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 18:11:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-work-efficiently-with-large-SAS-tables-on-a-Oracle-server/m-p/770982#M244590</guid>
      <dc:creator>aasdfafafsdfsaf</dc:creator>
      <dc:date>2021-09-28T18:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to work efficiently with large SAS tables on a Oracle server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-work-efficiently-with-large-SAS-tables-on-a-Oracle-server/m-p/770983#M244591</link>
      <description>&lt;P&gt;If the data is in the same Oracle server, &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/acreldb/n05b4mygsvt845n1vnr6r5kchbjf.htm" target="_self"&gt;then explicit passthrough will ensure&amp;nbsp;&lt;STRONG&gt;all work&lt;/STRONG&gt; is done in the database&lt;/A&gt; and will minimize the I/O back to the SAS session.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have one table local and one table remote, then that's a recipe for a slow query.&amp;nbsp; SAS is forced to bring ALL records into the SAS session to compare/filter for the join.&amp;nbsp; If you can upload the smaller table (or a subset) to the database then use PROC SQL to join there, that's best. If the join is on a small subset of key values, you might even be able to create a nested query filter (using the IN operator) with those literal values to subset the larger remote table. You would first build those literal values with a PROC SQL on the local table and SELECT INTO a macro variable, then use that as part of the SQL you send to the remote database.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 18:19:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-work-efficiently-with-large-SAS-tables-on-a-Oracle-server/m-p/770983#M244591</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2021-09-28T18:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to work efficiently with large SAS tables on a Oracle server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-work-efficiently-with-large-SAS-tables-on-a-Oracle-server/m-p/770987#M244592</link>
      <description>Thank you!&lt;BR /&gt;I'll try to implement this first and get back</description>
      <pubDate>Tue, 28 Sep 2021 18:23:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-work-efficiently-with-large-SAS-tables-on-a-Oracle-server/m-p/770987#M244592</guid>
      <dc:creator>aasdfafafsdfsaf</dc:creator>
      <dc:date>2021-09-28T18:23:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to work efficiently with large SAS tables on a Oracle server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-work-efficiently-with-large-SAS-tables-on-a-Oracle-server/m-p/771043#M244618</link>
      <description>&lt;P&gt;Also&amp;nbsp;&amp;nbsp;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;in (select col_in_table_b)&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;can be a lot more expensive&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;than an inner join if the parser does not convert to a join for you, as the whole table B is read for each row in table A.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Submit a query with an inner join.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 22:52:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-work-efficiently-with-large-SAS-tables-on-a-Oracle-server/m-p/771043#M244618</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-09-28T22:52:49Z</dc:date>
    </item>
  </channel>
</rss>

