<?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: Put function in where statement takes longer time. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Put-function-in-where-statement-takes-longer-time/m-p/165908#M263718</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Post the proc format code and the data step.&lt;/P&gt;&lt;P&gt;Most probably the user defined format is complex enough to eat CPU cycles.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Nov 2014 14:05:42 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2014-11-11T14:05:42Z</dc:date>
    <item>
      <title>Put function in where statement takes longer time.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Put-function-in-where-statement-takes-longer-time/m-p/165906#M263716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;wherefunctionsHi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to apply a user defined format through a put funtion in the where statement while setting the dataset and it it is taking 1 hour, and if i remove the put function, it takes 3 minutes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What can be the issue , and how can we overcome it ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2014 13:38:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Put-function-in-where-statement-takes-longer-time/m-p/165906#M263716</guid>
      <dc:creator>damanaulakh88</dc:creator>
      <dc:date>2014-11-11T13:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: Put function in where statement takes longer time.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Put-function-in-where-statement-takes-longer-time/m-p/165907#M263717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, posting the code would be useful.&amp;nbsp; I wouldn't recommend putting functions like that in a where clause as its called for each row then totaling up time.&amp;nbsp; What are you trying to where, why not use the underlying data, e.g if date then '01JAN2014'd, if number then =1, etc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2014 13:53:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Put-function-in-where-statement-takes-longer-time/m-p/165907#M263717</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-11-11T13:53:39Z</dc:date>
    </item>
    <item>
      <title>Re: Put function in where statement takes longer time.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Put-function-in-where-statement-takes-longer-time/m-p/165908#M263718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Post the proc format code and the data step.&lt;/P&gt;&lt;P&gt;Most probably the user defined format is complex enough to eat CPU cycles.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2014 14:05:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Put-function-in-where-statement-takes-longer-time/m-p/165908#M263718</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2014-11-11T14:05:42Z</dc:date>
    </item>
    <item>
      <title>Re: Put function in where statement takes longer time.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Put-function-in-where-statement-takes-longer-time/m-p/165909#M263719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using the cntlin option to create a format for a variable and tehn applying to a bigger dataset.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2014 14:21:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Put-function-in-where-statement-takes-longer-time/m-p/165909#M263719</guid>
      <dc:creator>damanaulakh88</dc:creator>
      <dc:date>2014-11-11T14:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: Put function in where statement takes longer time.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Put-function-in-where-statement-takes-longer-time/m-p/165910#M263720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With that kind of difference I suspect that your column is indexed.&lt;/P&gt;&lt;P&gt;Putting a function in where clause effectively removes the possibility to use index (with some exceptions, like substr from pos 1).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"&lt;SPAN class="xis-noteGenText"&gt;Note: &lt;/SPAN&gt;Conditions are not optimized with an index for arithmetic operators, a variable-to-variable condition, the sounds-like operator, and any function other than the TRIM and SUBSTR function as listed above."&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/67885/HTML/default/n06cy7dznbx6gen1q9mat8de6rdq.htm#n0u590ljao5bivn0zsac4k49dhik" title="http://support.sas.com/documentation/cdl/en/lrcon/67885/HTML/default/n06cy7dznbx6gen1q9mat8de6rdq.htm#n0u590ljao5bivn0zsac4k49dhik"&gt;Understanding SAS Indexes :: SAS(R) 9.4 Language Reference: Concepts, Fourth Edition&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your value is a constant, create is a macro variable prior to the extract step.&lt;/P&gt;&lt;P&gt;If it't in a transaction/look-up table, have the put function in an earlier step.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2014 14:25:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Put-function-in-where-statement-takes-longer-time/m-p/165910#M263720</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2014-11-11T14:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: Put function in where statement takes longer time.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Put-function-in-where-statement-takes-longer-time/m-p/165911#M263721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Aside from the possibilty of overriding an index, POST THE CODE!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2014 14:34:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Put-function-in-where-statement-takes-longer-time/m-p/165911#M263721</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2014-11-11T14:34:05Z</dc:date>
    </item>
  </channel>
</rss>

