<?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: Please explain the purpose of statement Select ... parallel  ..within proc sql in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Please-explain-the-purpose-of-statement-Select-parallel-within/m-p/286506#M58774</link>
    <description>&lt;P&gt;You're using direct pass through to SQL and &lt;U&gt;&lt;STRONG&gt;this is Oracle code&lt;/STRONG&gt;&lt;/U&gt; not SAS code.&lt;/P&gt;
&lt;P&gt;It would look like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/* Parallel(a,8) No_index(a) */&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From a quick google search and guessing based on the words &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&amp;nbsp;it's saying allow parallel processing and don't use&amp;nbsp;an index on table&amp;nbsp;a.&lt;/P&gt;
&lt;P&gt;Terminology wise they're called Optimizer Hints:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.oracle.com/cd/B10500_01/server.920/a96533/hintsref.htm#5300" target="_blank"&gt;https://docs.oracle.com/cd/B10500_01/server.920/a96533/hintsref.htm#5300&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may want to find the correct reference for your version of Oracle.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyways, hope that helps.&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 22 Jul 2016 22:37:53 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-07-22T22:37:53Z</dc:date>
    <item>
      <title>Please explain the purpose of statement Select ... parallel  ..within proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Please-explain-the-purpose-of-statement-Select-parallel-within/m-p/286505#M58773</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;My company uses extensively the code below when sas programs access to the server.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc SQL;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; connect to oracle as conn (user=xxx password=xxx path=xxx);&lt;/P&gt;
&lt;P&gt;create table test_table as&lt;/P&gt;
&lt;P&gt;&amp;nbsp;select * from connection to conn&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;(SELECT %STR(/)%STR(*)+PARALLEL(a,8) NO_INDEX(a) %STR(*)%STR(/)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a.* ,&amp;nbsp; c.var1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from tableA a,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tableC c&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where a.A_id =c.C-id );&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; quit;&lt;/P&gt;
&lt;P&gt;What is the purpose of above BOLD statement ? I only know that it boosts up processing efficiency for sql .&lt;/P&gt;
&lt;P&gt;Thanks for all supports.&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;WT1968&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jul 2016 22:30:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Please-explain-the-purpose-of-statement-Select-parallel-within/m-p/286505#M58773</guid>
      <dc:creator>wtien196838</dc:creator>
      <dc:date>2016-07-22T22:30:49Z</dc:date>
    </item>
    <item>
      <title>Re: Please explain the purpose of statement Select ... parallel  ..within proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Please-explain-the-purpose-of-statement-Select-parallel-within/m-p/286506#M58774</link>
      <description>&lt;P&gt;You're using direct pass through to SQL and &lt;U&gt;&lt;STRONG&gt;this is Oracle code&lt;/STRONG&gt;&lt;/U&gt; not SAS code.&lt;/P&gt;
&lt;P&gt;It would look like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/* Parallel(a,8) No_index(a) */&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From a quick google search and guessing based on the words &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&amp;nbsp;it's saying allow parallel processing and don't use&amp;nbsp;an index on table&amp;nbsp;a.&lt;/P&gt;
&lt;P&gt;Terminology wise they're called Optimizer Hints:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.oracle.com/cd/B10500_01/server.920/a96533/hintsref.htm#5300" target="_blank"&gt;https://docs.oracle.com/cd/B10500_01/server.920/a96533/hintsref.htm#5300&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may want to find the correct reference for your version of Oracle.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyways, hope that helps.&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jul 2016 22:37:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Please-explain-the-purpose-of-statement-Select-parallel-within/m-p/286506#M58774</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-07-22T22:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: Please explain the purpose of statement Select ... parallel  ..within proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Please-explain-the-purpose-of-statement-Select-parallel-within/m-p/286556#M58791</link>
      <description>&lt;P&gt;Just on a side note: If you would use "preserve_comments" then you could write the hint directly without any macro "quoting".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc SQL;
  connect to oracle as conn (user=xxx password=xxx path=xxx &lt;FONT color="#800000"&gt;&lt;STRONG&gt;preserve_comments&lt;/STRONG&gt;&lt;/FONT&gt;);
  create table test_table as
    select * from connection to conn
    (SELECT  &lt;FONT color="#800000"&gt;&lt;STRONG&gt;/*&lt;/STRONG&gt;&lt;/FONT&gt;+ PARALLEL(a,8) NO_INDEX(a) &lt;FONT color="#993300"&gt;&lt;STRONG&gt;*/&lt;/STRONG&gt;&lt;/FONT&gt;
      a.* ,  c.var1
    from tableA a,
      tableC c
    where a.A_id =c.C-id );
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And on another side note:&lt;/P&gt;
&lt;P&gt;I had to use such optimizer hints lately quite a bit and therefore than some reading about it. One thing the Oracle DBA's were often not so happy about was that once "users" learned about these hits, they've started to use them extensively even in case where it didn't make sense. The problem is: Parallelism can put quite a bit of load onto the database so if there are too many processes running in parallel at the same time then the overall effect of such parallelism can become contra-productive.&lt;/P&gt;</description>
      <pubDate>Sat, 23 Jul 2016 08:18:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Please-explain-the-purpose-of-statement-Select-parallel-within/m-p/286556#M58791</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2016-07-23T08:18:43Z</dc:date>
    </item>
  </channel>
</rss>

