<?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: proc means vs proc sql. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-means-vs-proc-sql/m-p/348514#M80711</link>
    <description>&lt;P&gt;Yes. It's not bad at all.&lt;/P&gt;&lt;P&gt;Recently many guys says Python Python Python everyday and off course I used it for certain purposes but&amp;nbsp;&lt;/P&gt;&lt;P&gt;for big data manipulations like this, I think SAS still holds significatn advantage to other languages.&lt;/P&gt;&lt;P&gt;Together with macro facility, it allows so much freedom.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks anyway,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kaz&lt;/P&gt;</description>
    <pubDate>Sun, 09 Apr 2017 13:09:52 GMT</pubDate>
    <dc:creator>k_shide</dc:creator>
    <dc:date>2017-04-09T13:09:52Z</dc:date>
    <item>
      <title>proc means vs proc sql.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means-vs-proc-sql/m-p/348507#M80706</link>
      <description>&lt;P&gt;Dear Gurus,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a dataset contains 21 million observations with 1500 variables.&lt;/P&gt;&lt;P&gt;I just want to make sum of 500 variables using two index variables. (say, product_code and date).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I still can finish the manipulation by using proc means by spending 30 minutes but just wondering&amp;nbsp;&lt;/P&gt;&lt;P&gt;if any of you experienced proc sql with group by can be faster or not?&lt;/P&gt;&lt;P&gt;I read some of articles about proc means vs proc sql but not very sure for the big data with many numbers of variables.&lt;/P&gt;&lt;P&gt;By the way, the data set is native SAS dataset and not coming from Oracle or any other database.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any opinion from will be appreciated.&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Kaz&lt;/P&gt;</description>
      <pubDate>Sun, 09 Apr 2017 12:06:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means-vs-proc-sql/m-p/348507#M80706</guid>
      <dc:creator>k_shide</dc:creator>
      <dc:date>2017-04-09T12:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: proc means vs proc sql.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means-vs-proc-sql/m-p/348508#M80707</link>
      <description>&lt;P&gt;Whatever procedure you're using it will have to read the data and to sort the data for summing by groups.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Both Proc SQL and Proc Means&amp;nbsp;are thread-enabled.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/69852/HTML/default/viewer.htm#n0czb9vxe72693n1lom0qmns6zlj.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrcon/69852/HTML/default/viewer.htm#n0czb9vxe72693n1lom0qmns6zlj.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't expect Proc SQL to outperform Proc Means for this task.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What you probably want to do is to ensure that multi-threading can get used where possible (=options set to allow for multi-threading).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would expect this process to be I/O bound so what certainly will impact on performance&amp;nbsp;is how your SAS WORK and UTILLOC area (used for sorting) are set up (but that's something only an admin can change).&lt;/P&gt;</description>
      <pubDate>Sun, 09 Apr 2017 12:29:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means-vs-proc-sql/m-p/348508#M80707</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2017-04-09T12:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: proc means vs proc sql.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means-vs-proc-sql/m-p/348509#M80708</link>
      <description>&lt;P&gt;Patrick,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks very much for your quick reply.&lt;/P&gt;&lt;P&gt;I read through and found the right key word for the option.&lt;/P&gt;&lt;P&gt;also thanks for not wasting time for replacing codes by proc sql still taking around 30 minutes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kaz&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 09 Apr 2017 12:36:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means-vs-proc-sql/m-p/348509#M80708</guid>
      <dc:creator>k_shide</dc:creator>
      <dc:date>2017-04-09T12:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: proc means vs proc sql.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means-vs-proc-sql/m-p/348512#M80710</link>
      <description>&lt;P&gt;30 minutes doesn't feel that bad for the volumes you're dealing with:&amp;nbsp;8 Bytes for a numeric variable&amp;nbsp;* 500 variables * 21M rows add up to more than 78GB.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'd expect the main bottleneck to be&amp;nbsp;I/O which is nothing you can do much about it except to reduce volumes as fast as you can and to minimize passes through the data while the volumes are high.&lt;/P&gt;</description>
      <pubDate>Sun, 09 Apr 2017 12:51:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means-vs-proc-sql/m-p/348512#M80710</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2017-04-09T12:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: proc means vs proc sql.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means-vs-proc-sql/m-p/348514#M80711</link>
      <description>&lt;P&gt;Yes. It's not bad at all.&lt;/P&gt;&lt;P&gt;Recently many guys says Python Python Python everyday and off course I used it for certain purposes but&amp;nbsp;&lt;/P&gt;&lt;P&gt;for big data manipulations like this, I think SAS still holds significatn advantage to other languages.&lt;/P&gt;&lt;P&gt;Together with macro facility, it allows so much freedom.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks anyway,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kaz&lt;/P&gt;</description>
      <pubDate>Sun, 09 Apr 2017 13:09:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means-vs-proc-sql/m-p/348514#M80711</guid>
      <dc:creator>k_shide</dc:creator>
      <dc:date>2017-04-09T13:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: proc means vs proc sql.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means-vs-proc-sql/m-p/348670#M80762</link>
      <description>&lt;P&gt;Add some options to fast your code.&lt;/P&gt;
&lt;P&gt;option &amp;nbsp;bufno=100 bufsize=128k &amp;nbsp;cpucount=12 threads;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You also could try PROC TABULATE.&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/53873"&gt;@Chris&lt;/a&gt;_NewZ claim PROC TABULATE is faster than MEANS or SQL at somewhere.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods select none;
proc tabulate data=sashelp.class out=want ;
var age weight height;
table (age weight height)*sum;
run;
ods select all;&lt;/CODE&gt;&lt;/PRE&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>Mon, 10 Apr 2017 13:08:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means-vs-proc-sql/m-p/348670#M80762</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-04-10T13:08:45Z</dc:date>
    </item>
    <item>
      <title>Re: proc means vs proc sql.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means-vs-proc-sql/m-p/348928#M80858</link>
      <description>&lt;P&gt;Thank you for the parameter setting and&amp;nbsp;&lt;/P&gt;&lt;P&gt;I totally forgot tabulate procedure which more flexible functions than means.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kaz&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2017 23:35:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means-vs-proc-sql/m-p/348928#M80858</guid>
      <dc:creator>k_shide</dc:creator>
      <dc:date>2017-04-10T23:35:20Z</dc:date>
    </item>
  </channel>
</rss>

