<?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: Fetching data from teradata into sas table taking more time in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Fetching-data-from-teradata-into-sas-table-taking-more-time/m-p/436077#M108414</link>
    <description>&lt;P&gt;please&amp;nbsp; use explicit pass through to optimize query and example is shown below and also add fastexport = yes in your connect statement&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;proc sql; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;connect to teradata(server=&lt;/SPAN&gt;&lt;I&gt;server&lt;/I&gt;&lt;SPAN&gt; user=&lt;/SPAN&gt;&lt;I&gt;userid&lt;/I&gt;&lt;SPAN&gt; pwd=&lt;/SPAN&gt;&lt;I&gt;password &lt;STRONG&gt;fastexport =yes&lt;/STRONG&gt;&lt;/I&gt;&lt;SPAN&gt;); &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;create table work.job204 as select * from connection to teradata&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt; (select * from employees &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;where jobcode=204&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;and name = 'smith'); &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;quit;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 11 Feb 2018 16:34:03 GMT</pubDate>
    <dc:creator>kiranv_</dc:creator>
    <dc:date>2018-02-11T16:34:03Z</dc:date>
    <item>
      <title>Fetching data from teradata into sas table taking more time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fetching-data-from-teradata-into-sas-table-taking-more-time/m-p/436044#M108394</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need your help to optimize the below query. In my code, query is fetching around 250 millions of data.&lt;/P&gt;&lt;P&gt;Can you suggest me what is the best way to fetch 250 millions data in short time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;LIBNAME X "C:\MY_SASDATA";&lt;/P&gt;&lt;P&gt;LIBNAME TD teradata&amp;nbsp; TDPID=TERADT USER="%SYSGET(USER)" &amp;nbsp;&amp;nbsp; PASSWORD="%SYSGET(PASSWD)" ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC SQL;&lt;/P&gt;&lt;P&gt;CREATE TABLE X.ALL_ACCTS AS &amp;nbsp;&amp;nbsp; SELECT VAR1, VAR2, VAR3, VAR4, VAR5, VAR5&amp;nbsp; FROM TD.TABLE1 AS TD&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;WHERE TD.ACCT_NBR =SAS.ACCT_NBR ;&lt;/P&gt;&lt;P&gt;QUIT;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here &lt;STRONG&gt;where clause having 6 conditions&lt;/STRONG&gt;. Please help me how can I optimize above query.&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>Sun, 11 Feb 2018 02:49:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fetching-data-from-teradata-into-sas-table-taking-more-time/m-p/436044#M108394</guid>
      <dc:creator>Banu</dc:creator>
      <dc:date>2018-02-11T02:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching data from teradata into sas table taking more time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fetching-data-from-teradata-into-sas-table-taking-more-time/m-p/436069#M108410</link>
      <description>&lt;P&gt;Was your code cut off? There's no 6 conditions or even a join but a WHERE which doesn't make sense because only one table is listed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/134610"&gt;@Banu&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need your help to optimize the below query. In my code, query is fetching around 250 millions of data.&lt;/P&gt;
&lt;P&gt;Can you suggest me what is the best way to fetch 250 millions data in short time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;LIBNAME X "C:\MY_SASDATA";&lt;/P&gt;
&lt;P&gt;LIBNAME TD teradata&amp;nbsp; TDPID=TERADT USER="%SYSGET(USER)" &amp;nbsp;&amp;nbsp; PASSWORD="%SYSGET(PASSWD)" ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC SQL;&lt;/P&gt;
&lt;P&gt;CREATE TABLE X.ALL_ACCTS AS &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SELECT VAR1, VAR2, VAR3, VAR4, VAR5, VAR5&amp;nbsp;&lt;/P&gt;
&lt;P&gt;FROM TD.TABLE1 AS TD&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;WHERE TD.ACCT_NBR =SAS.ACCT_NBR ;&lt;/P&gt;
&lt;P&gt;QUIT;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here &lt;STRONG&gt;where clause having 6 conditions&lt;/STRONG&gt;. Please help me how can I optimize above query.&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;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Feb 2018 05:05:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fetching-data-from-teradata-into-sas-table-taking-more-time/m-p/436069#M108410</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-02-11T05:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching data from teradata into sas table taking more time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fetching-data-from-teradata-into-sas-table-taking-more-time/m-p/436077#M108414</link>
      <description>&lt;P&gt;please&amp;nbsp; use explicit pass through to optimize query and example is shown below and also add fastexport = yes in your connect statement&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;proc sql; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;connect to teradata(server=&lt;/SPAN&gt;&lt;I&gt;server&lt;/I&gt;&lt;SPAN&gt; user=&lt;/SPAN&gt;&lt;I&gt;userid&lt;/I&gt;&lt;SPAN&gt; pwd=&lt;/SPAN&gt;&lt;I&gt;password &lt;STRONG&gt;fastexport =yes&lt;/STRONG&gt;&lt;/I&gt;&lt;SPAN&gt;); &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;create table work.job204 as select * from connection to teradata&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt; (select * from employees &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;where jobcode=204&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;and name = 'smith'); &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;quit;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Feb 2018 16:34:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fetching-data-from-teradata-into-sas-table-taking-more-time/m-p/436077#M108414</guid>
      <dc:creator>kiranv_</dc:creator>
      <dc:date>2018-02-11T16:34:03Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching data from teradata into sas table taking more time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fetching-data-from-teradata-into-sas-table-taking-more-time/m-p/436082#M108417</link>
      <description>&lt;P&gt;Add some options to fast it.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname x ..... readbuff=10000 bulkload=yes dbcommit=10000;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 11 Feb 2018 12:57:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fetching-data-from-teradata-into-sas-table-taking-more-time/m-p/436082#M108417</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-02-11T12:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching data from teradata into sas table taking more time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fetching-data-from-teradata-into-sas-table-taking-more-time/m-p/436083#M108418</link>
      <description>If we create a view by adding this select statement in teradata, and then&lt;BR /&gt;if I use create SAS table as select * from Teradata table;.We should not&lt;BR /&gt;create teradata table or temp table from SAS(No DDL use from SAS).&lt;BR /&gt;&lt;BR /&gt;Is it reduce time fetching time or any suggestions.&lt;BR /&gt;</description>
      <pubDate>Sun, 11 Feb 2018 13:12:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fetching-data-from-teradata-into-sas-table-taking-more-time/m-p/436083#M108418</guid>
      <dc:creator>Banu</dc:creator>
      <dc:date>2018-02-11T13:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching data from teradata into sas table taking more time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fetching-data-from-teradata-into-sas-table-taking-more-time/m-p/436084#M108419</link>
      <description>1. It seems that you have an inner join with a SAS table. If that's filtering the result, a temporary table is needed in TD.&lt;BR /&gt;2. Why do want to fetch 250'' rows to SAS? What is the next step? Try to keep as much data and processing in TD as possible.</description>
      <pubDate>Sun, 11 Feb 2018 13:24:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fetching-data-from-teradata-into-sas-table-taking-more-time/m-p/436084#M108419</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2018-02-11T13:24:09Z</dc:date>
    </item>
  </channel>
</rss>

