<?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 SQL passthrough in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SQL-passthrough/m-p/640826#M190952</link>
    <description>&lt;P&gt;Good afternoon, I need advice, please see two attach log files; first one o not know how to resolve on this. second one, only 10 records took over an hour to run is the&amp;nbsp; problem, how to resolved.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 17 Apr 2020 19:26:50 GMT</pubDate>
    <dc:creator>JHE</dc:creator>
    <dc:date>2020-04-17T19:26:50Z</dc:date>
    <item>
      <title>SQL passthrough</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQL-passthrough/m-p/640826#M190952</link>
      <description>&lt;P&gt;Good afternoon, I need advice, please see two attach log files; first one o not know how to resolve on this. second one, only 10 records took over an hour to run is the&amp;nbsp; problem, how to resolved.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 19:26:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQL-passthrough/m-p/640826#M190952</guid>
      <dc:creator>JHE</dc:creator>
      <dc:date>2020-04-17T19:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: SQL passthrough</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQL-passthrough/m-p/640847#M190960</link>
      <description>&lt;P&gt;For log1 - there is a disk space issue writing to a temporary sybase table. Contact your sybase DBA.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As for log2 - your query is the select DISTINCT with OUTOBS=10.&lt;/P&gt;
&lt;P&gt;To get that amount of output observation you probably need read much more observations,&lt;/P&gt;
&lt;P&gt;depending on data, amount of duplicates and of variables, beyond the overhead of the connection to sybase.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 20:37:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQL-passthrough/m-p/640847#M190960</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2020-04-17T20:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: SQL passthrough</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQL-passthrough/m-p/640854#M190961</link>
      <description>&lt;P&gt;log 1, I am going to contact SAS admin,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;log 2, might be the disk space issue, only 10 records but took over an hour to complete.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;&lt;P&gt;Joanne&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 20:48:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQL-passthrough/m-p/640854#M190961</guid>
      <dc:creator>JHE</dc:creator>
      <dc:date>2020-04-17T20:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: SQL passthrough</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQL-passthrough/m-p/640860#M190963</link>
      <description>&lt;P&gt;Not sure why you use DISTINCT in all of your queries. These will definitely slow them down and cause Sybase to do extra sorting to confirm the uniqueness of your result set and use more database temporary space. I try to avoid using that in any SQL I write. There are other ways to ensure uniqueness by refining your queries or doing summarising. I suggest you explore each of the tables you are reading to see if DISTINCT is necessary or not.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 21:33:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQL-passthrough/m-p/640860#M190963</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-04-17T21:33:48Z</dc:date>
    </item>
    <item>
      <title>Re: SQL passthrough</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQL-passthrough/m-p/640900#M190977</link>
      <description>Oh, good point .&lt;BR /&gt;</description>
      <pubDate>Sat, 18 Apr 2020 00:52:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQL-passthrough/m-p/640900#M190977</guid>
      <dc:creator>JHE</dc:creator>
      <dc:date>2020-04-18T00:52:36Z</dc:date>
    </item>
    <item>
      <title>Re: SQL passthrough</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQL-passthrough/m-p/640921#M190979</link>
      <description>&lt;P&gt;outobs= is a SAS option. When using explicit passthrough, the SQL code in there is viewed as a "black box" by SAS, and it does not change anything in there, like setting output options. So the whole query will be executed, including all joins and sorts for distinct. SAS then returns only 10 observations from what it gets.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regarding DISTINCT: use it only when it is needed. It forces a sort on ALL columns in the select, and you might imagine what that costs.&lt;/P&gt;</description>
      <pubDate>Sat, 18 Apr 2020 06:19:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQL-passthrough/m-p/640921#M190979</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-04-18T06:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: SQL passthrough</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQL-passthrough/m-p/640971#M190995</link>
      <description>Is there a way I can clean up my tempDB . Our SAS admin not reply to me yet&lt;BR /&gt;</description>
      <pubDate>Sat, 18 Apr 2020 16:27:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQL-passthrough/m-p/640971#M190995</guid>
      <dc:creator>JHE</dc:creator>
      <dc:date>2020-04-18T16:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: SQL passthrough</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQL-passthrough/m-p/640980#M190998</link>
      <description>&lt;P&gt;Your storage problems do not happen on the SAS side, they happen in the database, so you need to get in touch with the&amp;nbsp;&lt;STRONG&gt;D&lt;/STRONG&gt;ata&lt;STRONG&gt;B&lt;/STRONG&gt;ase&amp;nbsp;&lt;STRONG&gt;A&lt;/STRONG&gt;dministrator (DBA).&lt;/P&gt;</description>
      <pubDate>Sat, 18 Apr 2020 17:54:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQL-passthrough/m-p/640980#M190998</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-04-18T17:54:39Z</dc:date>
    </item>
    <item>
      <title>Re: SQL passthrough</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQL-passthrough/m-p/641041#M191021</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt; only 10 records took over an hour to run&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;You ran the whole query. That took an hour. Your only keeping 10 records of that result will not change the passthrough query.&lt;/P&gt;
&lt;P&gt;I can't tell you more since I will not open untrusted DOCX files, but you may be able to limit the number of rows inside the pass-through code, for example by adding a condition on ROWNUM or similar (ROWNUM is for Oracle).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Apr 2020 04:04:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQL-passthrough/m-p/641041#M191021</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-04-19T04:04:49Z</dc:date>
    </item>
  </channel>
</rss>

