<?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: SAS Update fast process in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-Update-fast-process/m-p/562157#M157459</link>
    <description>&lt;P&gt;The update table is&amp;nbsp;&lt;SPAN&gt;vw_SAS_CMDM_CI_General_Insurance&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 29 May 2019 05:09:49 GMT</pubDate>
    <dc:creator>sameer112217</dc:creator>
    <dc:date>2019-05-29T05:09:49Z</dc:date>
    <item>
      <title>SAS Update fast process</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Update-fast-process/m-p/561546#M157223</link>
      <description>&lt;P&gt;I am using an update process in SAS which is an actual SQL query. It is processing very fast in SQL but in SAS, the update process is take a long time. I need help as to how I can I optimize the update sub query from another table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Proc SQL;&lt;BR /&gt;update vw_SAS_CMDM_CI_General_Insurance&lt;BR /&gt;set SumInsured=z.SUM_INSURED ,&lt;BR /&gt;TotalPremium=z.NET_PREMIUM&lt;BR /&gt;from (select POLICYNO,sum(NET_PREMIUM)NET_PREMIUM,sum(SUM_INSURED)SUM_INSURED from DPR.pr_ytd with(nolock) where&lt;BR /&gt;system_id not in ('manual','RI','manual_adv','manual_adv_reversal') group by policyno ) Z&lt;BR /&gt;where z.POLICYNO =vw_SAS_CMDM_CI_General_Insurance.PolicyNo;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 May 2019 07:10:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Update-fast-process/m-p/561546#M157223</guid>
      <dc:creator>sameer112217</dc:creator>
      <dc:date>2019-05-25T07:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Update fast process</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Update-fast-process/m-p/561552#M157228</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/89720"&gt;@sameer112217&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Where is your update table, and the contributing tables? - In your SAS code you have a one-level table name&amp;nbsp;&lt;U&gt;vw_SAS_CMDM_CI_General_Insurance&lt;/U&gt;, and a one-level name is a short notation for work.tablename, which means that you update a temporary SAS table in the work library.&amp;nbsp;It does not really make sense, so I think you are half way through converting native SQL code to SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you can process the code in the database, then all referenced tables must exist in the data base, and in that case you are better off with an explicit pass-thru, where the code is sent from SAS and executed in the database. Then you can use your working code without changes.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We need more information to help you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 May 2019 09:55:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Update-fast-process/m-p/561552#M157228</guid>
      <dc:creator>ErikLund_Jensen</dc:creator>
      <dc:date>2019-05-25T09:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Update fast process</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Update-fast-process/m-p/562157#M157459</link>
      <description>&lt;P&gt;The update table is&amp;nbsp;&lt;SPAN&gt;vw_SAS_CMDM_CI_General_Insurance&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 05:09:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Update-fast-process/m-p/562157#M157459</guid>
      <dc:creator>sameer112217</dc:creator>
      <dc:date>2019-05-29T05:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Update fast process</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Update-fast-process/m-p/562173#M157461</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/89720"&gt;@sameer112217&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;vw_SAS_CMDM_CI_General_Insurance is a one level name meaning it is a SAS WORK table.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;DPR.pr_ytd with(nolock) is a two level name and the nolock option indicates that this is a SQL Server table.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I guess when you've tested in SQL Server directly then the one level table was also a SQL Server table. But now you're combining data from two different sources which likely leads to a lot of costly data movement which significant impact on performance.&lt;/P&gt;
&lt;P&gt;If above is true then also use a two level name for your vw_,,, table and keep all the processing in the database.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get a bit more info of what's going on eventually&amp;nbsp;also add the following global options and two options to the SQL statement and also post the SAS log.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options sastrace=',,,d' sastraceloc=saslog&amp;nbsp;nostsuffix;
proc sql feedback _method;
&amp;lt;your working and tested code &amp;gt;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 May 2019 07:08:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Update-fast-process/m-p/562173#M157461</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-05-29T07:08:24Z</dc:date>
    </item>
  </channel>
</rss>

