<?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 Creating an INDEX on output table in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Creating-an-INDEX-on-output-table/m-p/28125#M211</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are in the midst of migrating SAS code into DI Studio.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a job which creates some indexes at the end.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;I have tried to do this in DI Studio, without using user written code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run the job in DI Studio without indexes, it takes 20 seconds to run.&amp;nbsp; With indexes (it's still running but it's now over seven minutes).&amp;nbsp; I set the properties of the table to have indexes.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; /*---- Create the indexes for a table&amp;nbsp; ----*/ &lt;BR /&gt;&amp;nbsp;&amp;nbsp; %put %str(NOTE: Creating indexes ...);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; proc datasets lib = NS nolist; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; modify POLICY_HISTORY; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; index create insurance_ref;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; index create insurance_file_cnt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; index create p_key = (insurance_ref policy_version);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; quit; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; %rcSet(&amp;amp;syserr); &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;%end;&amp;nbsp; /* if table does not exist&amp;nbsp; */ &lt;/P&gt;&lt;P&gt;/*---- Append&amp;nbsp; ----*/ &lt;BR /&gt;%put %str(NOTE: Appending data ...);&lt;/P&gt;&lt;P&gt;proc append base = NS.POLICY_HISTORY &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data = &amp;amp;etls_lastTable (&amp;amp;etls_tableOptions) force; &lt;BR /&gt;run; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;^^&lt;BR /&gt;I think the reason it takes so long to run now, is because it applies the indexes to an empty dataset, and then appends the data to it.&amp;nbsp; I don't care about the append part, but I think the table loader transform does this by default.&amp;nbsp; I tried the SQL insert, and it still took ages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want the metadata to be meaningful, so in my head, the indexes need to be on the output table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess, I could have some user written code at the end of the job which puts the indexes on, but then the metadata wouldn't tell people it's there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, what's the right way for me to apply these indexes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm running DI Studio 4.21 on a Windows bases server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Oct 2011 05:19:05 GMT</pubDate>
    <dc:creator>JohnT</dc:creator>
    <dc:date>2011-10-12T05:19:05Z</dc:date>
    <item>
      <title>Creating an INDEX on output table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Creating-an-INDEX-on-output-table/m-p/28125#M211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are in the midst of migrating SAS code into DI Studio.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a job which creates some indexes at the end.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;I have tried to do this in DI Studio, without using user written code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run the job in DI Studio without indexes, it takes 20 seconds to run.&amp;nbsp; With indexes (it's still running but it's now over seven minutes).&amp;nbsp; I set the properties of the table to have indexes.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; /*---- Create the indexes for a table&amp;nbsp; ----*/ &lt;BR /&gt;&amp;nbsp;&amp;nbsp; %put %str(NOTE: Creating indexes ...);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; proc datasets lib = NS nolist; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; modify POLICY_HISTORY; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; index create insurance_ref;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; index create insurance_file_cnt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; index create p_key = (insurance_ref policy_version);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; quit; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; %rcSet(&amp;amp;syserr); &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;%end;&amp;nbsp; /* if table does not exist&amp;nbsp; */ &lt;/P&gt;&lt;P&gt;/*---- Append&amp;nbsp; ----*/ &lt;BR /&gt;%put %str(NOTE: Appending data ...);&lt;/P&gt;&lt;P&gt;proc append base = NS.POLICY_HISTORY &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data = &amp;amp;etls_lastTable (&amp;amp;etls_tableOptions) force; &lt;BR /&gt;run; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;^^&lt;BR /&gt;I think the reason it takes so long to run now, is because it applies the indexes to an empty dataset, and then appends the data to it.&amp;nbsp; I don't care about the append part, but I think the table loader transform does this by default.&amp;nbsp; I tried the SQL insert, and it still took ages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want the metadata to be meaningful, so in my head, the indexes need to be on the output table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess, I could have some user written code at the end of the job which puts the indexes on, but then the metadata wouldn't tell people it's there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, what's the right way for me to apply these indexes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm running DI Studio 4.21 on a Windows bases server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2011 05:19:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Creating-an-INDEX-on-output-table/m-p/28125#M211</guid>
      <dc:creator>JohnT</dc:creator>
      <dc:date>2011-10-12T05:19:05Z</dc:date>
    </item>
    <item>
      <title>Creating an INDEX on output table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Creating-an-INDEX-on-output-table/m-p/28126#M212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the Table Loader, you have the opportunity to specify whether you want the index to be built before or after table creation/update. &lt;/P&gt;&lt;P&gt;See "Index Condition", and refer to the Help section to chose the appropriate settings for your scenario.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Br&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Linus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Oct 2011 12:44:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Creating-an-INDEX-on-output-table/m-p/28126#M212</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2011-10-13T12:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: Creating an INDEX on output table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Creating-an-INDEX-on-output-table/m-p/28127#M213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the suggestion LinusH, I think that's what I was after.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would have expected to see this option on the output table, and not on the transform though?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll try it and see how it goes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Oct 2011 21:58:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Creating-an-INDEX-on-output-table/m-p/28127#M213</guid>
      <dc:creator>JohnT</dc:creator>
      <dc:date>2011-10-13T21:58:25Z</dc:date>
    </item>
  </channel>
</rss>

