<?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: Subsetting in a Teradata query w/ SAS table in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Subsetting-in-a-Teradata-query-w-SAS-table/m-p/205744#M4654</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, thank god, or someone else, for DI Studio! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It seemed that you just didn't specify a schema in the table specification for the temporary table.&lt;/P&gt;&lt;P&gt;Another good new was that the Teradata optimizer liked this better than a long IN-clause, cut the execution time to a third.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The downside is that I have to use TD-specific SQL in the join/where-clause (timestamp and cast()) instead of SAS dt-constants and functions.&lt;/P&gt;&lt;P&gt;So if anyone have an idea to do this using implicit SQL pass-thru, or to make the IN_CLAUSE have better performance, please share.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/L&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Mar 2015 13:59:20 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2015-03-19T13:59:20Z</dc:date>
    <item>
      <title>Subsetting in a Teradata query w/ SAS table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Subsetting-in-a-Teradata-query-w-SAS-table/m-p/205743#M4653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;i got a similar issue as &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://communities.sas.com/message/112605"&gt;http://communities.sas.com/message/112605&lt;/A&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;But I can't resolve by using information from that thread.&lt;/P&gt;&lt;P&gt;I have two tables in TD, lets say Customer and Sales, about the the same size (couple of 10'' recs).&lt;/P&gt;&lt;P&gt;I'm able to push down an implicit join with a subset on Sale date.&lt;/P&gt;&lt;P&gt;Result is a around 10' for a date, and the query is around 2 mins.&lt;/P&gt;&lt;P&gt;I wish to further optimize via pushing down a list om of Sales Agents (around 300) for sub-setting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried the MULTISOURCE_OPTS=IN_CLAUSE, which resulted in in five time increase of query time.&lt;/P&gt;&lt;P&gt;Now I'm trying to get the Sales Agent list in a TD temporary table instead, but can't figure out how to use it in the join.&lt;/P&gt;&lt;P&gt;For an implicit join to occur, the following constraint apply (from SAS/ACCESS doc):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"&lt;SPAN style="color: #000000; font-family: 'Source Sans Pro', arial, 'Arial Unicode MS', geneva, 'Lucida Grande', sans-serif; font-size: 16px; background-color: #ffffff;"&gt;You must specify the SCHEMA= LIBNAME option to fully qualify each table name in a join for each LIBNAME that you reference"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Source Sans Pro', arial, 'Arial Unicode MS', geneva, 'Lucida Grande', sans-serif; font-size: 10pt; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff; font-family: 'Source Sans Pro', arial, 'Arial Unicode MS', geneva, 'Lucida Grande', sans-serif;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;And temporary tables &lt;/SPAN&gt;doesn't&lt;SPAN style="font-size: 10pt;"&gt; use schema. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 16px; background-color: #ffffff; font-family: 'Source Sans Pro', arial, 'Arial Unicode MS', geneva, 'Lucida Grande', sans-serif;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;So, in &lt;/SPAN&gt;case&lt;SPAN style="font-size: 10pt;"&gt; of &lt;/SPAN&gt;explicit&lt;SPAN style="font-size: 10pt;"&gt; SQL pass-thru, how do I refer between between a global connection (temporary) and an ordinary connection? Haven't found any examples so far.I&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2015 13:35:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Subsetting-in-a-Teradata-query-w-SAS-table/m-p/205743#M4653</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2015-03-19T13:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: Subsetting in a Teradata query w/ SAS table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Subsetting-in-a-Teradata-query-w-SAS-table/m-p/205744#M4654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, thank god, or someone else, for DI Studio! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It seemed that you just didn't specify a schema in the table specification for the temporary table.&lt;/P&gt;&lt;P&gt;Another good new was that the Teradata optimizer liked this better than a long IN-clause, cut the execution time to a third.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The downside is that I have to use TD-specific SQL in the join/where-clause (timestamp and cast()) instead of SAS dt-constants and functions.&lt;/P&gt;&lt;P&gt;So if anyone have an idea to do this using implicit SQL pass-thru, or to make the IN_CLAUSE have better performance, please share.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/L&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2015 13:59:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Subsetting-in-a-Teradata-query-w-SAS-table/m-p/205744#M4654</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2015-03-19T13:59:20Z</dc:date>
    </item>
  </channel>
</rss>

