<?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: query run from SAS batch to a HIVE partitioned table takes half an hour in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/query-run-from-SAS-batch-to-a-HIVE-partitioned-table-takes-half/m-p/480463#M14991</link>
    <description>&lt;P&gt;So, I ran three queries.&amp;nbsp; The first (count(*) and second (select...) came back immediately.&amp;nbsp; The "select distinct " one is the problem, it will likely to half an hour as usual.&amp;nbsp; I am not even sure I need select distinct, this table should be distinct.&amp;nbsp; It is a just-in-case.&amp;nbsp;&amp;nbsp; But why would it be so much longer?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;sql&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;connect&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;to&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; hadoop(server=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"xx"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; schema=xxxxxxx_xxxx uri=&amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;uri.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;CREATE&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;TABLE&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; lib.test1 &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;as&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;select&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; * &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;from&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; connection to hadoop &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;SELECT&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; count(*) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;as&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; N&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;FROM&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; xxxxxx_xxxx.history&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;WHERE&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; MONTH_END_DATE = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"2018-05-31"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;DISCONNECT&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;FROM&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; HADOOP;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;quit&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;proc&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;sql&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;connect&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;to&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; hadoop(server=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"xx"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; schema=xxxxxxx_xxxx uri=&amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;uri.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;CREATE&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;TABLE&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; lib.elig_mos_test2 &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;as&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;select&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; * &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;from&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; connection to hadoop &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;SELECT&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&amp;nbsp;id , month_count&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;FROM&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; xxxxxxx_xxxx.history&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;WHERE&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; MONTH_END_DATE = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"2018-05-31"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;DISCONNECT&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;FROM&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; HADOOP;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;quit&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;proc&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;sql&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;connect&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;to&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; hadoop(server=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"xx"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; schema=xxxxxxx_xxxx uri=&amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;uri.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;CREATE&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;TABLE&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; lib.test3 &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;as&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;select&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; * &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;from&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; connection to hadoop &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;SELECT&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;distinct&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; id, month_count&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;FROM&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; xxxxxxx_xxxx.history&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;WHERE&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; MONTH_END_DATE = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"2018-05-31"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;DISCONNECT&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;FROM&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; HADOOP;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;quit&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 23 Jul 2018 14:50:58 GMT</pubDate>
    <dc:creator>lauracw4</dc:creator>
    <dc:date>2018-07-23T14:50:58Z</dc:date>
    <item>
      <title>query run from SAS batch to a HIVE partitioned table takes half an hour</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/query-run-from-SAS-batch-to-a-HIVE-partitioned-table-takes-half/m-p/480108#M14983</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to pull two fields from a partitioned HIVE ORC table.&amp;nbsp; It is partitioned on month_end_date.&amp;nbsp;&amp;nbsp; Each month of data is about 5 million records.&amp;nbsp; SAS batch is SAS (r) Proprietary Software 9.4 (TS1M3)&amp;nbsp;. Apache Hive (version 1.2.1000.2.5.3.0-37). Each field has the format double.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;options&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;compress&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=yes macrogen &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;symbolgen&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;mlogic&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; sastrace=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;',,,ds'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; sastraceloc=saslog nostsuffix &lt;FONT face="Courier New" size="3"&gt;sqlgeneration=dbms dbidirectexec sql_ip_trace=(note, &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;source&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;msglevel&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=i &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;source2&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;source2&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;mprint&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;MCOMPILENOTE&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=all ;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; URI="jdbc:=...";&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;libname lib "xxx";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;connect to hadoop(server="lnbradpp06" schema=xxxxxxx_xxxx uri=&amp;amp;uri.);&lt;/P&gt;&lt;P&gt;CREATE TABLE lib.enrollment as select * from connection to hadoop&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;SELECT distinct&amp;nbsp;id , count&lt;/P&gt;&lt;P&gt;FROM xxxxxx_xxxx.history&lt;/P&gt;&lt;P&gt;WHERE MONTH_END_DATE = "2018-06-30"&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;DISCONNECT FROM HADOOP;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know why this would take so long (half an hour), or if my options (accumulated from various SAS/Hadoop examples) is a problem. Has anyone had this issue with SAS at their company?&amp;nbsp;&amp;nbsp; The solution I am getting is to switch to R.&lt;/P&gt;</description>
      <pubDate>Sat, 21 Jul 2018 01:20:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/query-run-from-SAS-batch-to-a-HIVE-partitioned-table-takes-half/m-p/480108#M14983</guid>
      <dc:creator>lauracw4</dc:creator>
      <dc:date>2018-07-21T01:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: query run from SAS batch to a HIVE partitioned table takes half an hour</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/query-run-from-SAS-batch-to-a-HIVE-partitioned-table-takes-half/m-p/480130#M14984</link>
      <description>&lt;P&gt;Try just a simple count(*) - that will remove the possibility that the network between the database and SAS is the cause of the slowness and let us know how fast that runs:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;

connect to hadoop(server="lnbradpp06" schema=xxxxxxx_xxxx uri=&amp;amp;uri.);

select * from connection to hadoop

(

SELECT count(*) as row_count

FROM xxxxxx_xxxx.history

WHERE MONTH_END_DATE = "2018-06-30"

);

DISCONNECT FROM HADOOP;

quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 21 Jul 2018 08:55:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/query-run-from-SAS-batch-to-a-HIVE-partitioned-table-takes-half/m-p/480130#M14984</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-07-21T08:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: query run from SAS batch to a HIVE partitioned table takes half an hour</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/query-run-from-SAS-batch-to-a-HIVE-partitioned-table-takes-half/m-p/480231#M14990</link>
      <description>99% sure that SAS isn't the problem. Probably not network either, unless you have a very poor line to your cluster.&lt;BR /&gt;Then I think you should switch to implicit pass through instead - sastrace will give you nothing with explicit pass through. &lt;BR /&gt;Another thing to try: execute the query from Hue and compare.</description>
      <pubDate>Sun, 22 Jul 2018 13:19:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/query-run-from-SAS-batch-to-a-HIVE-partitioned-table-takes-half/m-p/480231#M14990</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2018-07-22T13:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: query run from SAS batch to a HIVE partitioned table takes half an hour</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/query-run-from-SAS-batch-to-a-HIVE-partitioned-table-takes-half/m-p/480463#M14991</link>
      <description>&lt;P&gt;So, I ran three queries.&amp;nbsp; The first (count(*) and second (select...) came back immediately.&amp;nbsp; The "select distinct " one is the problem, it will likely to half an hour as usual.&amp;nbsp; I am not even sure I need select distinct, this table should be distinct.&amp;nbsp; It is a just-in-case.&amp;nbsp;&amp;nbsp; But why would it be so much longer?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;sql&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;connect&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;to&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; hadoop(server=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"xx"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; schema=xxxxxxx_xxxx uri=&amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;uri.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;CREATE&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;TABLE&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; lib.test1 &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;as&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;select&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; * &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;from&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; connection to hadoop &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;SELECT&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; count(*) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;as&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; N&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;FROM&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; xxxxxx_xxxx.history&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;WHERE&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; MONTH_END_DATE = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"2018-05-31"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;DISCONNECT&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;FROM&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; HADOOP;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;quit&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;proc&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;sql&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;connect&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;to&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; hadoop(server=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"xx"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; schema=xxxxxxx_xxxx uri=&amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;uri.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;CREATE&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;TABLE&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; lib.elig_mos_test2 &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;as&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;select&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; * &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;from&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; connection to hadoop &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;SELECT&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&amp;nbsp;id , month_count&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;FROM&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; xxxxxxx_xxxx.history&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;WHERE&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; MONTH_END_DATE = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"2018-05-31"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;DISCONNECT&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;FROM&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; HADOOP;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;quit&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;proc&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;sql&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;connect&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;to&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; hadoop(server=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"xx"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; schema=xxxxxxx_xxxx uri=&amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;uri.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;CREATE&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;TABLE&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; lib.test3 &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;as&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;select&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; * &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;from&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; connection to hadoop &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;SELECT&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;distinct&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; id, month_count&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;FROM&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; xxxxxxx_xxxx.history&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;WHERE&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; MONTH_END_DATE = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"2018-05-31"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;DISCONNECT&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;FROM&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; HADOOP;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;quit&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jul 2018 14:50:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/query-run-from-SAS-batch-to-a-HIVE-partitioned-table-takes-half/m-p/480463#M14991</guid>
      <dc:creator>lauracw4</dc:creator>
      <dc:date>2018-07-23T14:50:58Z</dc:date>
    </item>
    <item>
      <title>Re: query run from SAS batch to a HIVE partitioned table takes half an hour</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/query-run-from-SAS-batch-to-a-HIVE-partitioned-table-takes-half/m-p/480464#M14992</link>
      <description>&lt;P&gt;I am looking up implicit passthrough now.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jul 2018 14:54:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/query-run-from-SAS-batch-to-a-HIVE-partitioned-table-takes-half/m-p/480464#M14992</guid>
      <dc:creator>lauracw4</dc:creator>
      <dc:date>2018-07-23T14:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: query run from SAS batch to a HIVE partitioned table takes half an hour</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/query-run-from-SAS-batch-to-a-HIVE-partitioned-table-takes-half/m-p/480526#M14993</link>
      <description>&lt;P&gt;Less than 1 minute!&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jul 2018 16:29:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/query-run-from-SAS-batch-to-a-HIVE-partitioned-table-takes-half/m-p/480526#M14993</guid>
      <dc:creator>lauracw4</dc:creator>
      <dc:date>2018-07-23T16:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: query run from SAS batch to a HIVE partitioned table takes half an hour</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/query-run-from-SAS-batch-to-a-HIVE-partitioned-table-takes-half/m-p/480639#M15001</link>
      <description>&lt;P&gt;I never use DISTINCT on a query if the table does not require it. Adding it "just in case" will add overhead to your processing that isn't necessary. Also I would argue it is probably better to let it happen so you know about it rather than having DISTINCT hiding the problem. You can add safeguards later in your program if required, for example using DATA step BY processing on ID with FIRST. and LAST. logic.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jul 2018 21:10:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/query-run-from-SAS-batch-to-a-HIVE-partitioned-table-takes-half/m-p/480639#M15001</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-07-23T21:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: query run from SAS batch to a HIVE partitioned table takes half an hour</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/query-run-from-SAS-batch-to-a-HIVE-partitioned-table-takes-half/m-p/480641#M15002</link>
      <description>&lt;P&gt;Well, I found out the select distinct query is slow in Beeline too.&amp;nbsp;&amp;nbsp; So, I guess it is a non-SAS problem.&amp;nbsp;&amp;nbsp; Still I need to find an explanation.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jul 2018 21:27:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/query-run-from-SAS-batch-to-a-HIVE-partitioned-table-takes-half/m-p/480641#M15002</guid>
      <dc:creator>lauracw4</dc:creator>
      <dc:date>2018-07-23T21:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: query run from SAS batch to a HIVE partitioned table takes half an hour</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/query-run-from-SAS-batch-to-a-HIVE-partitioned-table-takes-half/m-p/484347#M15106</link>
      <description>&lt;P&gt;So, our solution turned out to be a non-SAS one.&amp;nbsp; Before doing the select distinct query, we have to execute a set hive statement since it is not currently the default on our system:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;connect to hadoop(server=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"xxxx"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; schema=xxxxxxx_xxxx uri=xxxx);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;execute(set hive.vectorized.execution.enabled=true) by hadoop;&lt;/P&gt;&lt;P&gt;create table lib.part as select * from connection to hadoop&lt;/P&gt;&lt;P&gt;(SELECT distinct part_id, part_date&lt;/P&gt;&lt;P&gt;from xxxxxxx_xxxx.history&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;DISCONNECT FROM HADOOP;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This made a query that took over 35 minutes take 10 seconds.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Aug 2018 13:12:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/query-run-from-SAS-batch-to-a-HIVE-partitioned-table-takes-half/m-p/484347#M15106</guid>
      <dc:creator>lauracw4</dc:creator>
      <dc:date>2018-08-06T13:12:52Z</dc:date>
    </item>
  </channel>
</rss>

