<?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: performance question? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94252#M26700</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Again a strong reason IMHO to use Modify as Linus suggested as it allows you to combine insert/update in one go without re-writting the whole master table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data m700;&lt;BR /&gt;&amp;nbsp; retain var1 var2 'm700';&lt;BR /&gt;&amp;nbsp; do keyvar=2 to 4,6 to 10;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;BR /&gt;&amp;nbsp; end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data k100;&lt;BR /&gt;&amp;nbsp; retain var1 var2 'k100';&lt;BR /&gt;&amp;nbsp; do keyvar=1,5,9;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;BR /&gt;&amp;nbsp; end;&lt;BR /&gt;run;&lt;BR /&gt; &lt;BR /&gt;proc sql;&lt;BR /&gt;&amp;nbsp; create index keyvar on m700 (keyvar);&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;data m700;&lt;BR /&gt;&amp;nbsp; set k100(rename=(var1=kvar1 var2=kvar2));&lt;BR /&gt;&amp;nbsp; modify m700 key=keyvar;&lt;BR /&gt;&amp;nbsp; if _iorc_ = 0 then &lt;BR /&gt;&amp;nbsp; do;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* updates */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var1=kvar1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var2=kvar2;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; replace;&lt;BR /&gt;&amp;nbsp; end;&lt;BR /&gt;&amp;nbsp; else&lt;BR /&gt;&amp;nbsp; if _iorc_&amp;gt;0 then&lt;BR /&gt;&amp;nbsp; do;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* inserts */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var1=kvar1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var2=kvar2;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;BR /&gt;&amp;nbsp; end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://communities.sas.com/message/124647"&gt;Re: Stack database columns&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Apr 2012 04:42:41 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2012-04-26T04:42:41Z</dc:date>
    <item>
      <title>performance question?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94235#M26683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;need to improve performance.&lt;/P&gt;&lt;P&gt;table1 = 700million obs&lt;/P&gt;&lt;P&gt;proc sort data=table1;&lt;/P&gt;&lt;P&gt;by id&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;table2=100k obs&lt;/P&gt;&lt;P&gt;proc sort data=table2;&lt;/P&gt;&lt;P&gt;by id;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data table1;&lt;/P&gt;&lt;P&gt;update table1 table2;&lt;/P&gt;&lt;P&gt;by id;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;q. how to improve performance?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2012 03:49:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94235#M26683</guid>
      <dc:creator>sassharp</dc:creator>
      <dc:date>2012-04-25T03:49:00Z</dc:date>
    </item>
    <item>
      <title>Re: performance question?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94236#M26684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming these are SAS tables and your 100k table fits into memory below code would be an option:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data m700;&lt;BR /&gt;&amp;nbsp; retain var1 var2 'm700';&lt;BR /&gt;&amp;nbsp; do keyvar=1 to 1000;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;BR /&gt;&amp;nbsp; end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data k100;&lt;BR /&gt;&amp;nbsp; retain var1 var2 'k100';&lt;BR /&gt;&amp;nbsp; do keyvar=2,5,10,100,999;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;BR /&gt;&amp;nbsp; end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data m700;&lt;BR /&gt;&amp;nbsp; if _n_=1 then&lt;BR /&gt;&amp;nbsp; do;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dcl hash h1(dataset:'k100');&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; h1.defineKey('keyvar');&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; h1.defineData(all:'y');&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; h1.defineDone();&lt;BR /&gt;&amp;nbsp; end;&lt;BR /&gt;&amp;nbsp; modify m700;&lt;BR /&gt;&amp;nbsp; _rc=h1.find();&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2012 04:47:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94236#M26684</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2012-04-25T04:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: performance question?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94237#M26685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hash Table or proc format &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2012 05:37:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94237#M26685</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-04-25T05:37:30Z</dc:date>
    </item>
    <item>
      <title>Re: performance question?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94238#M26686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A more old school approach could be using MODIFY with the KEY= option (if feasible).&lt;/P&gt;&lt;P&gt;This eliminates the need to sort the master table, and the master table is not rewritten during update.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2012 07:34:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94238#M26686</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2012-04-25T07:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: performance question?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94239#M26687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think it is a fast solution. Modify is only suited for the small table .&lt;/P&gt;&lt;P&gt;And the most important thing is that it is dangerous when your sas session stop accidently, the whole dataset will be collapsed totally.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2012 07:52:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94239#M26687</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-04-25T07:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: performance question?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94240#M26688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's usually the fastest way to update a table, as long the master table is large, and the transaction table is relative small.&lt;/P&gt;&lt;P&gt;The risk for abnormal interruption has to weighted with work to restore a back-up (file system, or SAS PROC COPY style).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2012 08:01:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94240#M26688</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2012-04-25T08:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: performance question?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94241#M26689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Linus' second point that when using MODIFY with KEY= avoids rewriting the whole master table is a very strong argument for this approach.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Considering the relation of observations in the master and the transaction data set (700m to 100k) I would assume that it's even worth to create an index over the key variables (if not already existing).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data m700;&lt;BR /&gt;&amp;nbsp; retain var1 var2 'm700';&lt;BR /&gt;&amp;nbsp; do keyvar=1 to 1000;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;BR /&gt;&amp;nbsp; end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data k100;&lt;BR /&gt;&amp;nbsp; retain var1 var2 'k100';&lt;BR /&gt;&amp;nbsp; do keyvar=2,5,10,100,999;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;BR /&gt;&amp;nbsp; end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;&amp;nbsp; create index keyvar on m700 (keyvar);&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data m700;&lt;BR /&gt;&amp;nbsp; set k100(rename=(var1=kvar1 var2=kvar2));&lt;BR /&gt;&amp;nbsp; modify m700 key=keyvar;&lt;BR /&gt;&amp;nbsp; if _iorc_ = 0 then &lt;BR /&gt;&amp;nbsp; do;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var1=kvar1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var2=kvar2;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; replace;&lt;BR /&gt;&amp;nbsp; end;&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2012 08:21:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94241#M26689</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2012-04-25T08:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: performance question?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94242#M26690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, an index is essential to speed this process up!&lt;/P&gt;&lt;P&gt;Over time, it might be necessary as a maintenance action, to recreate (and sort) the master table, so that the index processing can remain efficient.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2012 08:27:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94242#M26690</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2012-04-25T08:27:18Z</dc:date>
    </item>
    <item>
      <title>Re: performance question?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94243#M26691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, LinusH&lt;/P&gt;&lt;P&gt;The way you proposed need to make a index firstly, that means you need to spend lots of time to make such an index, it is almost like re-order a large table , which will waste lots of time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And this way will be very fast if the result of query is less than twenty percent of a table . but we can't sure it too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2012 08:27:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94243#M26691</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-04-25T08:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: performance question?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94244#M26692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe that even if your SAS session aborts the data set is not necessarily corrupted. Actually it would have to be quite an extreme event like a sudden power failure to corrupt the table.&lt;/P&gt;&lt;P&gt;As much as I understand Modify transactional integrity ("unit of work") is maintained so (in my understanding) worst what may happen if a SAS session aborts is that only have of the updates are applied.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S: And if worst comes to worst then there is even a REPAIR statement as part of Proc Datasets which might fix damages. In all the time I've used Modify I had only once problems - and Repair fixed it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2012 08:31:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94244#M26692</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2012-04-25T08:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: performance question?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94245#M26693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The OP asked for better performing code to update a 700M master table with 100k "transactions". My assumption would be that this is not a one-off task. Creating an index is a one-off task so it might be well worth it to create this index and avoid writting 700M records every single time you run an update.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2012 08:35:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94245#M26693</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2012-04-25T08:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: performance question?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94246#M26694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nothing is certain...&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i this example the ratio of the master and transaction table is 0,014%.&lt;/P&gt;&lt;P&gt;And the index creation is a one time job, not a daily as sort/recreation of the master table would be.&lt;/P&gt;&lt;P&gt;And if they are lucky, the index might be helpful for query as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2012 08:36:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94246#M26694</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2012-04-25T08:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: performance question?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94247#M26695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi. LinusH&lt;/P&gt;&lt;P&gt;20% I mean is not the ratio of master and tran .&lt;/P&gt;&lt;P&gt;I mean the number of updated observations in master table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From the documentaion , if the result of query is less than 20% , using index is less efficient than consequent access method ( like SET ) .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway , Anyhow , We can talk to each other right now, which lead me to wonder where are you (Patrick and LinusH) come from ?&lt;/P&gt;&lt;P&gt;I guess Australia ? Right ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nice to meet you and Patrick.&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2012 08:50:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94247#M26695</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-04-25T08:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: performance question?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94248#M26696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm a swede&lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.sas.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2012 09:04:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94248#M26696</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2012-04-25T09:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: performance question?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94249#M26697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I live in Australia since a couple of years.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2012 09:38:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94249#M26697</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2012-04-25T09:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: performance question?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94250#M26698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A _jive_internal="true" class="active_link" href="https://communities.sas.com/thread/34628"&gt;https://communities.sas.com/thread/34628&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This above link is the scenario. Out of 100k records 10 k ids are common in 700M and 100K. These 10K records from 100 (Table2) should be updated in table1(700M) and we need to append the remaining 90K records from table2 should be appended to table1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result should contain 700M and 90K.&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, 25 Apr 2012 12:30:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94250#M26698</guid>
      <dc:creator>sassharp</dc:creator>
      <dc:date>2012-04-25T12:30:27Z</dc:date>
    </item>
    <item>
      <title>Re: performance question?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94251#M26699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to use Hash Table + remove() .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2012 02:14:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94251#M26699</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-04-26T02:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: performance question?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94252#M26700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Again a strong reason IMHO to use Modify as Linus suggested as it allows you to combine insert/update in one go without re-writting the whole master table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data m700;&lt;BR /&gt;&amp;nbsp; retain var1 var2 'm700';&lt;BR /&gt;&amp;nbsp; do keyvar=2 to 4,6 to 10;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;BR /&gt;&amp;nbsp; end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data k100;&lt;BR /&gt;&amp;nbsp; retain var1 var2 'k100';&lt;BR /&gt;&amp;nbsp; do keyvar=1,5,9;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;BR /&gt;&amp;nbsp; end;&lt;BR /&gt;run;&lt;BR /&gt; &lt;BR /&gt;proc sql;&lt;BR /&gt;&amp;nbsp; create index keyvar on m700 (keyvar);&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;data m700;&lt;BR /&gt;&amp;nbsp; set k100(rename=(var1=kvar1 var2=kvar2));&lt;BR /&gt;&amp;nbsp; modify m700 key=keyvar;&lt;BR /&gt;&amp;nbsp; if _iorc_ = 0 then &lt;BR /&gt;&amp;nbsp; do;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* updates */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var1=kvar1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var2=kvar2;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; replace;&lt;BR /&gt;&amp;nbsp; end;&lt;BR /&gt;&amp;nbsp; else&lt;BR /&gt;&amp;nbsp; if _iorc_&amp;gt;0 then&lt;BR /&gt;&amp;nbsp; do;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* inserts */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var1=kvar1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var2=kvar2;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;BR /&gt;&amp;nbsp; end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://communities.sas.com/message/124647"&gt;Re: Stack database columns&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2012 04:42:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94252#M26700</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2012-04-26T04:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: performance question?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94253#M26701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,Patrick.&lt;/P&gt;&lt;P&gt;I have a different opinion with you. As I said before, Using index would be faster than Direct Access Method (i.e. SET statement) only if the number of updated or query observations is less than 20% of total number of a table .&lt;/P&gt;&lt;P&gt;At sometime, you can see SAS will not use index at LOG when declaring OPTIONS MSLEVEL=I .&lt;/P&gt;&lt;P&gt;Why ? that is because using index is not better than SET statement. That means that is not always a good way to use index .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I prefer to Hash Table , My favorite .&lt;/P&gt;&lt;P&gt;Anyway, It is personal favor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2012 04:54:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94253#M26701</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-04-26T04:54:35Z</dc:date>
    </item>
    <item>
      <title>Re: performance question?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94254#M26702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Considering that the bottleneck is normally I/O I assume that reading an index file is faster than reading the whole 700M records and even more so writing 100k records and updating the index is faster than writing 700M records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe this 20% figure only applies for select (read) and not for update/insert.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2012 05:02:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/performance-question/m-p/94254#M26702</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2012-04-26T05:02:44Z</dc:date>
    </item>
  </channel>
</rss>

