<?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 improve efficency for the following codes? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-improve-efficency-for-the-following-codes/m-p/105923#M22061</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Duke,&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;1.Thesis is a library opened in sas server, that is to say thesis.Slideback_F is stored in sas server.&lt;/P&gt;&lt;P&gt;2.The oracle database is readable only, can not put thesis.Slideback_F there.&lt;/P&gt;&lt;P&gt;3.Can you explain in detail that how to "subset your Oracle data before transferring it to SAS"?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Dawn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 May 2012 01:44:06 GMT</pubDate>
    <dc:creator>bbb_NG</dc:creator>
    <dc:date>2012-05-08T01:44:06Z</dc:date>
    <item>
      <title>How to improve efficency for the following codes?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-improve-efficency-for-the-following-codes/m-p/105921#M22059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create TABLE thesis.Slideback_F AS &lt;/P&gt;&lt;P&gt;select&amp;nbsp; t1.'HUB Cust Id'n&amp;nbsp; ,t1.'Version Date'n&lt;/P&gt;&lt;P&gt;from&amp;nbsp; thesis.Slideback_v1 as t1 inner join&amp;nbsp; cnmap.VIEW_MAPRH_M_CN_CUSTOMER_PFS as t2&lt;/P&gt;&lt;P&gt;on t1.'HUB Cust Id'n =t2.'HUB Cust Id'n&amp;nbsp; and t1.'Version Date'n =t2.'Ver Date'n &lt;/P&gt;&lt;P&gt;where (t1.'Version Date'n-t2.'Date Requested Added'n)/3600/24&amp;gt;=120;&lt;/P&gt;&lt;P&gt;Quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note:'HUB Cust Id'n&amp;nbsp; is customer id,'Version Date'n is like '30SEP2011:00:00:00'&lt;/P&gt;&lt;P&gt;'HUB Cust Id'n&amp;nbsp; +'Version Date'n is the primary key in&lt;/P&gt;&lt;P&gt;cnmap.VIEW_MAPRH_M_CN_CUSTOMER （oracle database&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;）&lt;/P&gt;&lt;P&gt;observation in thesis.Slideback_F is 7300.&lt;/P&gt;&lt;P&gt;observation in cnmap.VIEW_MAPRH_M_CN_CUSTOMER_PFS is about 24 months * 100k(per month)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sas log&lt;/P&gt;&lt;P&gt;real time&amp;nbsp; 10:19.60&lt;/P&gt;&lt;P&gt;CPU time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9.48 s&lt;/P&gt;&lt;P&gt;how to short real time based on the above code?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2012 09:46:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-improve-efficency-for-the-following-codes/m-p/105921#M22059</guid>
      <dc:creator>bbb_NG</dc:creator>
      <dc:date>2012-05-07T09:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to improve efficency for the following codes?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-improve-efficency-for-the-following-codes/m-p/105922#M22060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;need more information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is thesis also an oracle database on the same server?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not, then SAS is transferring all the data from the Oracle database to your SAS server for execution.&amp;nbsp; That would involve a lot of network and disk I/O and explain the discrepancy between the real time and the CPU time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Two ways to shorten the real time:&lt;/P&gt;&lt;P&gt;-- move the thesis data into tables on the Oracle database so the join executes there.&lt;/P&gt;&lt;P&gt;-- if that is not feasible, subset your Oracle data before transferring it to SAS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doc Muhlbaier&lt;/P&gt;&lt;P&gt;Duke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2012 20:20:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-improve-efficency-for-the-following-codes/m-p/105922#M22060</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2012-05-07T20:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to improve efficency for the following codes?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-improve-efficency-for-the-following-codes/m-p/105923#M22061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Duke,&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;1.Thesis is a library opened in sas server, that is to say thesis.Slideback_F is stored in sas server.&lt;/P&gt;&lt;P&gt;2.The oracle database is readable only, can not put thesis.Slideback_F there.&lt;/P&gt;&lt;P&gt;3.Can you explain in detail that how to "subset your Oracle data before transferring it to SAS"?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Dawn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2012 01:44:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-improve-efficency-for-the-following-codes/m-p/105923#M22061</guid>
      <dc:creator>bbb_NG</dc:creator>
      <dc:date>2012-05-08T01:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to improve efficency for the following codes?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-improve-efficency-for-the-following-codes/m-p/105924#M22062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about put them all into a condition ? and try to balance equation .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;on t1.'HUB Cust Id'n =t2.'HUB Cust Id'n&amp;nbsp; and t1.'Version Date'n =t2.'Ver Date'n &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;and&lt;/STRONG&gt; t1.'Version Date'n&amp;gt;=(120*3600/24) + t2.'Date Requested Added'n;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2012 09:47:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-improve-efficency-for-the-following-codes/m-p/105924#M22062</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-05-08T09:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to improve efficency for the following codes?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-improve-efficency-for-the-following-codes/m-p/105925#M22063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ksharp,&lt;/P&gt;&lt;P&gt;real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10:21.99&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CPU time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10.23 秒&lt;/P&gt;&lt;P&gt;almost equal to the former SQL.&lt;/P&gt;&lt;P&gt;Anyway, thanks for giving another thought.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2012 10:07:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-improve-efficency-for-the-following-codes/m-p/105925#M22063</guid>
      <dc:creator>bbb_NG</dc:creator>
      <dc:date>2012-05-08T10:07:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to improve efficency for the following codes?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-improve-efficency-for-the-following-codes/m-p/105926#M22064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The real time is the clock time from the start of Proc SQL.&lt;/P&gt;&lt;P&gt;CPU time is the SAS part of the execution. So, one can assume that most CPU cycles is used to extract data from Oracle.&lt;/P&gt;&lt;P&gt;Once in SAS, and the join, it will seems pretty fast.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know about Oracle index strategies, but it's usually a problem to have a calculation in the where, since then the optimizer will use full tablescan strategy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By adding&lt;/P&gt;&lt;P&gt;&lt;EM&gt;options sastrace=',,,d' sastraceloc=saslog;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Oracle will echo the Oracle part of the query. I suggest you use that to discuss to an Oracle DBA/expert about optimize that part of the query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/Linus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2012 10:18:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-improve-efficency-for-the-following-codes/m-p/105926#M22064</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2012-05-08T10:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to improve efficency for the following codes?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-improve-efficency-for-the-following-codes/m-p/105927#M22065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Linus,Thanks for your suggestion.I'll try.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2012 10:22:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-improve-efficency-for-the-following-codes/m-p/105927#M22065</guid>
      <dc:creator>bbb_NG</dc:creator>
      <dc:date>2012-05-08T10:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to improve efficency for the following codes?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-improve-efficency-for-the-following-codes/m-p/105928#M22066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another option if the Thesis.Slideback_V1 is substantially smaller than the Oracle table, try the DBKEY= option:&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/acreldb/63144/HTML/default/viewer.htm#n0tcetvx1zpnayn1r8actrkjrd5o.htm"&gt;http://support.sas.com/documentation/cdl/en/acreldb/63144/HTML/default/viewer.htm#n0tcetvx1zpnayn1r8actrkjrd5o.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you can at least get the create temporary table authorization in Oracle, you can look at the Oracle temporary tables support for SAS/ACCESS (also in the online doc). Use that to upload your thesis table to Oracle.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2012 11:13:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-improve-efficency-for-the-following-codes/m-p/105928#M22066</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2012-05-08T11:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to improve efficency for the following codes?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-improve-efficency-for-the-following-codes/m-p/105929#M22067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Haha. That doesn't work.&lt;/P&gt;&lt;P&gt;Maybe you can try some options to speed it. Still I don't know whether it is worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;System Option Description&lt;/P&gt;&lt;P&gt;DBIDIRECTEXEC= Controls SQL optimization for SAS/ACCESS engines.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2012 08:01:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-improve-efficency-for-the-following-codes/m-p/105929#M22067</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-05-09T08:01:34Z</dc:date>
    </item>
  </channel>
</rss>

