<?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 from SAS Linux x64 to Oracle db table generating additional long running query on Oracle in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Join-from-SAS-Linux-x64-to-Oracle-db-table-generating-additional/m-p/768746#M243861</link>
    <description>&lt;P&gt;Further to what I said earlier I would like clarify that the additional long running query pertains to the view.&lt;/P&gt;
&lt;P&gt;Your Oracle team can confirm this.&amp;nbsp;&lt;BR /&gt;You can engage with them if there are issues.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 21 Sep 2021 11:43:51 GMT</pubDate>
    <dc:creator>Sajid01</dc:creator>
    <dc:date>2021-09-21T11:43:51Z</dc:date>
    <item>
      <title>Join from SAS Linux x64 to Oracle db table generating additional long running query on Oracle</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-from-SAS-Linux-x64-to-Oracle-db-table-generating-additional/m-p/768576#M243790</link>
      <description>&lt;P&gt;When running the following join in SAS Enterprise Guide, an additional query is being generated on the Oracle DB which is extremely long running and is causing production performance issues.&amp;nbsp; Does anyone have any idea how to stop this additional query being generated on Oracle?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Actual query submitted on Linux platform (modified slightly for this platform):&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table work.outputtable as&lt;BR /&gt;select t1.filename,&lt;BR /&gt;t1.int_cell_phone,&lt;BR /&gt;t1.response_dttm,&lt;BR /&gt;t1.country,&lt;BR /&gt;t2.account_id,&lt;BR /&gt;t2.org_id&lt;BR /&gt;from work.SAS_table1 t1 inner join&lt;BR /&gt;ci_mart.ma_account t2 /*** oracle table ***/&lt;BR /&gt;on t1.customer_rk = t2.customer_rk;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Additional long running query being generated on Oracle "automatically" (ie. not in the submitted code):&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SELECT "ACCOUNT_ID", "ORG_ID", "CUSTOMER_RK" FROM CI_MART.MA_ACCOUNT WHERE ((("CUSTOMER_RK"=:"CUSTOMER_RK") OR (("CUSTOMER_RK" IS NULL ) AND ( :"CUSTOMER_RK" IS NULL ))))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Sep 2021 14:40:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-from-SAS-Linux-x64-to-Oracle-db-table-generating-additional/m-p/768576#M243790</guid>
      <dc:creator>KirstenM</dc:creator>
      <dc:date>2021-09-20T14:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: Join from SAS Linux x64 to Oracle db table generating additional long running query on Oracle</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-from-SAS-Linux-x64-to-Oracle-db-table-generating-additional/m-p/768685#M243834</link>
      <description>&lt;P&gt;The oracle table (&lt;SPAN&gt;ci_mart.ma_account t2) you are connecting to must be a view.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;So&amp;nbsp; when a view is referenced, the query&amp;nbsp; referencing the view is executed. This is the normal behavior&amp;nbsp;and cannot be avoided.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Discuss with Oracle team to find a solution.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Sep 2021 00:17:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-from-SAS-Linux-x64-to-Oracle-db-table-generating-additional/m-p/768685#M243834</guid>
      <dc:creator>Sajid01</dc:creator>
      <dc:date>2021-09-21T00:17:24Z</dc:date>
    </item>
    <item>
      <title>Re: Join from SAS Linux x64 to Oracle db table generating additional long running query on Oracle</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-from-SAS-Linux-x64-to-Oracle-db-table-generating-additional/m-p/768698#M243843</link>
      <description>&lt;P&gt;This is happening exactly as you'd expect:&amp;nbsp;&lt;SPAN style="font-family: inherit;"&gt;You are writing a SAS query, and asking SAS to translate it into Oracle Syntax, which it does.&amp;nbsp;&lt;/SPAN&gt;You could write your own Oracle query if you preferred.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You also ask SAS to merge a SAS table to an Oracle table. The only way is for SAS to read the &lt;STRONG&gt;whole&lt;/STRONG&gt; Oracle table. This is slow.&lt;/P&gt;
&lt;P&gt;A better option -if you are only interested in a small subset of the Oracle table- is to upload the keys of interest to Oracle and subset there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here, SAS seems to have inserted bind variables (prefixed with a colon). My knowledge of Oracle reaches its limit, and I don't know why this happened. I've never seen SAS do this before. If it's a way to pass key values from SAS to Oracle, it's clever, but probably very inefficient for a large number of keys.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To recap:&lt;/P&gt;
&lt;P&gt;- If you merge data in SAS, the Oracle data must be downloaded to SAS. Obviously.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- If the Oracle table is much larger than what you need, you can subset by uploading the desired keys to a temp Oracle table, or by inserting the keys as part of the SAS SQL query in a where clause. The second method is limited to queries with a small number of key values.&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Sep 2021 04:22:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-from-SAS-Linux-x64-to-Oracle-db-table-generating-additional/m-p/768698#M243843</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-09-21T04:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: Join from SAS Linux x64 to Oracle db table generating additional long running query on Oracle</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-from-SAS-Linux-x64-to-Oracle-db-table-generating-additional/m-p/768746#M243861</link>
      <description>&lt;P&gt;Further to what I said earlier I would like clarify that the additional long running query pertains to the view.&lt;/P&gt;
&lt;P&gt;Your Oracle team can confirm this.&amp;nbsp;&lt;BR /&gt;You can engage with them if there are issues.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Sep 2021 11:43:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-from-SAS-Linux-x64-to-Oracle-db-table-generating-additional/m-p/768746#M243861</guid>
      <dc:creator>Sajid01</dc:creator>
      <dc:date>2021-09-21T11:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: Join from SAS Linux x64 to Oracle db table generating additional long running query on Oracle</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-from-SAS-Linux-x64-to-Oracle-db-table-generating-additional/m-p/776900#M247107</link>
      <description>&lt;LI-SPOILER&gt;Hi there Thanks for your feedback.&amp;nbsp; MA_ACCOUNT is not view, it is a table. I have logged a SAS track regarding this.&lt;/LI-SPOILER&gt;</description>
      <pubDate>Thu, 28 Oct 2021 06:53:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-from-SAS-Linux-x64-to-Oracle-db-table-generating-additional/m-p/776900#M247107</guid>
      <dc:creator>KirstenM</dc:creator>
      <dc:date>2021-10-28T06:53:44Z</dc:date>
    </item>
    <item>
      <title>Re: Join from SAS Linux x64 to Oracle db table generating additional long running query on Oracle</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-from-SAS-Linux-x64-to-Oracle-db-table-generating-additional/m-p/776902#M247108</link>
      <description>&lt;P&gt;Thanks for your feedback.&amp;nbsp; It's the null queries that Oracle is generating that I am trying to get resolved.&amp;nbsp; I have logged a SAS track.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2021 06:54:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-from-SAS-Linux-x64-to-Oracle-db-table-generating-additional/m-p/776902#M247108</guid>
      <dc:creator>KirstenM</dc:creator>
      <dc:date>2021-10-28T06:54:49Z</dc:date>
    </item>
  </channel>
</rss>

