<?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: INDEX and PROC SQL ORDER BY and GROUP BY in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/INDEX-and-PROC-SQL-ORDER-BY-and-GROUP-BY/m-p/617487#M180975</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;did you try `options msglevel=i;` ?&lt;/P&gt;&lt;P&gt;that should display info if an index was used.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All the best&lt;/P&gt;&lt;P&gt;Bart&lt;/P&gt;</description>
    <pubDate>Wed, 15 Jan 2020 15:45:40 GMT</pubDate>
    <dc:creator>yabwon</dc:creator>
    <dc:date>2020-01-15T15:45:40Z</dc:date>
    <item>
      <title>INDEX and PROC SQL ORDER BY and GROUP BY</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INDEX-and-PROC-SQL-ORDER-BY-and-GROUP-BY/m-p/616723#M180594</link>
      <description>&lt;P&gt;I can't find any information on this: will index benefit PROC SQL code that uses ORDER BY and, especially, GROUP BY?&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jan 2020 21:08:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INDEX-and-PROC-SQL-ORDER-BY-and-GROUP-BY/m-p/616723#M180594</guid>
      <dc:creator>Haris</dc:creator>
      <dc:date>2020-01-11T21:08:45Z</dc:date>
    </item>
    <item>
      <title>Re: INDEX and PROC SQL ORDER BY and GROUP BY</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INDEX-and-PROC-SQL-ORDER-BY-and-GROUP-BY/m-p/616726#M180596</link>
      <description>&lt;P&gt;... and while we're on the topic, if anyone knows if INDEX would speed up procedures that run random effects models such as MIXED and GLIMMIX that block the dataset by GROUPID, please let us know.&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jan 2020 21:37:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INDEX-and-PROC-SQL-ORDER-BY-and-GROUP-BY/m-p/616726#M180596</guid>
      <dc:creator>Haris</dc:creator>
      <dc:date>2020-01-11T21:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: INDEX and PROC SQL ORDER BY and GROUP BY</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INDEX-and-PROC-SQL-ORDER-BY-and-GROUP-BY/m-p/616780#M180632</link>
      <description>&lt;P&gt;According to the fourth edition of the Advanced Prep Guide for SAS 9, pages 229 and 230, the following queries can be optimised by an index:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;a WHERE clause expression that contains a comparison operator, the TRIM or SUBSTR function, the CONTAINS operator, the LIKE operator&lt;/LI&gt;&lt;LI&gt;a subquery returning values to the IN operator&lt;/LI&gt;&lt;LI&gt;a correlated subquery in which the column being compared with the correlated reference is indexed&lt;/LI&gt;&lt;LI&gt;a join in which the join expression contains the “=” operator and/or all the columns in the join expression are indexed in one of the tables being joined&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Sun, 12 Jan 2020 12:52:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INDEX-and-PROC-SQL-ORDER-BY-and-GROUP-BY/m-p/616780#M180632</guid>
      <dc:creator>jvdl</dc:creator>
      <dc:date>2020-01-12T12:52:22Z</dc:date>
    </item>
    <item>
      <title>Re: INDEX and PROC SQL ORDER BY and GROUP BY</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INDEX-and-PROC-SQL-ORDER-BY-and-GROUP-BY/m-p/616792#M180636</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13995"&gt;@Haris&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;... and while we're on the topic, if anyone knows if INDEX would speed up procedures that run random effects models such as MIXED and GLIMMIX that block the dataset by GROUPID, please let us know.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If the data are indexed by GROUPID but not sorted by GROUPID, I can imagine beneficial usage of indexes if you use a "BY GROUPID" statement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I don't think that is what you mean by "block the dataset".&amp;nbsp; I presume you want an analysis that includes&amp;nbsp;some sort of between-block contrasts.&amp;nbsp; In that case I don't see how indexing helps, since the entire dataset (not a subset) needs to be read in.&amp;nbsp;&amp;nbsp;If so,&amp;nbsp;it would be faster&amp;nbsp;to read the whole dataset sequentially (i.e. not in block order), and accumulate the necessary statistics in memory for each block.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe there are some types of iterative maximum-likelihood estimation techniques that benefit from re-ordering the data, but I assume the iterations that requiring re-reading data use a dynamically created (and organized) utility file - at least for large data collections that can't be efficiently managed in memory.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or am I missing the question entirely?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 12 Jan 2020 14:51:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INDEX-and-PROC-SQL-ORDER-BY-and-GROUP-BY/m-p/616792#M180636</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2020-01-12T14:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: INDEX and PROC SQL ORDER BY and GROUP BY</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INDEX-and-PROC-SQL-ORDER-BY-and-GROUP-BY/m-p/616809#M180645</link>
      <description>You got it right.  Since a categorical random effects model processes the data by levels of the random variable, I am wondering if index of that random factor gets used in computation.</description>
      <pubDate>Sun, 12 Jan 2020 19:14:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INDEX-and-PROC-SQL-ORDER-BY-and-GROUP-BY/m-p/616809#M180645</guid>
      <dc:creator>Haris</dc:creator>
      <dc:date>2020-01-12T19:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: INDEX and PROC SQL ORDER BY and GROUP BY</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INDEX-and-PROC-SQL-ORDER-BY-and-GROUP-BY/m-p/616903#M180696</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13995"&gt;@Haris&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;You got it right. Since a categorical random effects model processes the data by levels of the random variable, I am wondering if index of that random factor gets used in computation.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Well, I can't&amp;nbsp; say I know the answer to that question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I can say that I don't see any advantage in this case to indexing the random variable.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2020 13:51:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INDEX-and-PROC-SQL-ORDER-BY-and-GROUP-BY/m-p/616903#M180696</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2020-01-13T13:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: INDEX and PROC SQL ORDER BY and GROUP BY</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INDEX-and-PROC-SQL-ORDER-BY-and-GROUP-BY/m-p/617484#M180973</link>
      <description>&lt;P&gt;When I run PROC SQL with GROUP BY, SAS log does not contain any mention of INDEX use but a specific program runs in just under 3 minutes instead of just under 4 minutes prior to the implementation of the INDEX.&amp;nbsp; Not a rigorous test but that's all I got.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jan 2020 15:33:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INDEX-and-PROC-SQL-ORDER-BY-and-GROUP-BY/m-p/617484#M180973</guid>
      <dc:creator>Haris</dc:creator>
      <dc:date>2020-01-15T15:33:20Z</dc:date>
    </item>
    <item>
      <title>Re: INDEX and PROC SQL ORDER BY and GROUP BY</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INDEX-and-PROC-SQL-ORDER-BY-and-GROUP-BY/m-p/617487#M180975</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;did you try `options msglevel=i;` ?&lt;/P&gt;&lt;P&gt;that should display info if an index was used.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All the best&lt;/P&gt;&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jan 2020 15:45:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INDEX-and-PROC-SQL-ORDER-BY-and-GROUP-BY/m-p/617487#M180975</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2020-01-15T15:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: INDEX and PROC SQL ORDER BY and GROUP BY</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INDEX-and-PROC-SQL-ORDER-BY-and-GROUP-BY/m-p/618255#M181344</link>
      <description>I did.  There was no note about INDEX but 25% of the execution time was shaved off.</description>
      <pubDate>Sat, 18 Jan 2020 14:58:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INDEX-and-PROC-SQL-ORDER-BY-and-GROUP-BY/m-p/618255#M181344</guid>
      <dc:creator>Haris</dc:creator>
      <dc:date>2020-01-18T14:58:28Z</dc:date>
    </item>
  </channel>
</rss>

