<?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: Proc sql on huge data in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751154#M236421</link>
    <description>&lt;P&gt;Furthermore, it might not be the filtering that is causing execution time. Performance is about the whole chain of data on disk, movement to memory and CPU ussage.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is your data in a Base SAS libname? What kind of storage?&lt;/P&gt;
&lt;P&gt;Add these options to better understand your bottlenecks:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options fullstimer msglevel=i;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 30 Jun 2021 09:35:10 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2021-06-30T09:35:10Z</dc:date>
    <item>
      <title>Proc sql on huge data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751149#M236417</link>
      <description>&lt;P&gt;Hello Experts,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My data is very huge, it takes 5 hours to run the code. Do you know some tricks to avoid this please ?&lt;/P&gt;
&lt;P&gt;My code is :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
	create table event2020 as
		select *
			from pkt.event
				where year(datepart(d_compta)) &amp;gt;= 2019
					and year(datepart(d_compta)) &amp;lt;= 2020;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thank you very muche for your help !&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 08:59:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751149#M236417</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2021-06-30T08:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql on huge data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751152#M236419</link>
      <description>&lt;UL&gt;
&lt;LI&gt;Have d_compta indexed&lt;/LI&gt;
&lt;LI&gt;Use dt intervals instead of function call in the where cluase&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Wed, 30 Jun 2021 09:26:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751152#M236419</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2021-06-30T09:26:08Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql on huge data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751154#M236421</link>
      <description>&lt;P&gt;Furthermore, it might not be the filtering that is causing execution time. Performance is about the whole chain of data on disk, movement to memory and CPU ussage.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is your data in a Base SAS libname? What kind of storage?&lt;/P&gt;
&lt;P&gt;Add these options to better understand your bottlenecks:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options fullstimer msglevel=i;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Jun 2021 09:35:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751154#M236421</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2021-06-30T09:35:10Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql on huge data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751160#M236422</link>
      <description>Thank you, LinushH!&lt;BR /&gt;What do you mean by " d_compta indexed" and "Use dt intervals" please ?</description>
      <pubDate>Wed, 30 Jun 2021 10:02:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751160#M236422</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2021-06-30T10:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql on huge data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751179#M236432</link>
      <description>&lt;P&gt;First thing that jumps to my mind: Is your source table a SAS table or in a data base? Where does libref pkt point to?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it's a database then most likely the where condition doesn't get pushed to the database (because of the use of the datepart() function) but all the data gets first transferred over the network to SAS and then only filtered on the SAS side.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could run below two queries to test the theory.&lt;/P&gt;
&lt;P&gt;The 2nd query will push the where condition to the data base for execution (if your source table is in a database) so if the 2nd query is much faster then the required cause of action is clear.&lt;/P&gt;
&lt;P&gt;IF the source table is in a database then the options I've added will show you in the SAS log which portion of the query gets pushed to the db for execution.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options fullstimer msglevel=i;
options sastrace=',,,d' sastraceloc=saslog nostsuffix;

libname pkt list;

proc sql;
	create table test_1 as
		select d_compta
			from pkt.event
				where year(datepart(d_compta)) = 2019
				;
quit;

proc sql;
	create table test_2 as
		select d_compta
			from pkt.event
				where '01jan2019 00:00:00'dt &amp;lt;= d_compta &amp;lt; '01jan2020 00:00:00'dt
				;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 12:18:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751179#M236432</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2021-06-30T12:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql on huge data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751186#M236436</link>
      <description>Or try this one :&lt;BR /&gt;&lt;BR /&gt;proc sql;&lt;BR /&gt;	create table event2020 as&lt;BR /&gt;		select *&lt;BR /&gt;			from pkt.event&lt;BR /&gt;				where year(datepart(d_compta)) in (2019 2020);&lt;BR /&gt;quit;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Or event try data step like :&lt;BR /&gt;&lt;BR /&gt;options cpucount=8 threads compress=yes bufno=100 bufsize=128k ;&lt;BR /&gt;data event2020;&lt;BR /&gt; set pkt.event;&lt;BR /&gt; if year(datepart(d_compta)) in (2019 2020);&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;P.S. I would expect data step is faster than SQL .</description>
      <pubDate>Wed, 30 Jun 2021 12:25:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751186#M236436</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-06-30T12:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql on huge data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751190#M236437</link>
      <description>&lt;P&gt;Thank you, Ksharp ! The&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;bufno=100 bufsize=128k is it maximum size please ?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 12:34:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751190#M236437</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2021-06-30T12:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql on huge data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751200#M236442</link>
      <description>&lt;P&gt;No. Actually I steal it from&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;&amp;nbsp; &amp;nbsp;.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From his test, it looks like "&lt;SPAN&gt;bufno=100 bufsize=128k&amp;nbsp;" is the best configure for running speed .&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;But you could ask&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 12:43:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751200#M236442</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-06-30T12:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql on huge data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751202#M236443</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/286185"&gt;@SASdevAnneMarie&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So you're 100% sure that your source table is already a SAS table? If you execute...&lt;/P&gt;
&lt;PRE class="language-sas"&gt;&lt;CODE&gt;libname pkt list;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;...does that show you a pathname as the location in the SAS log or something else?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 12:46:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751202#M236443</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2021-06-30T12:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql on huge data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751206#M236444</link>
      <description>Thank you for your message. I see this:&lt;BR /&gt;Libref=   PKT&lt;BR /&gt;      Scope=    IOM ROOT COMP ENV&lt;BR /&gt;      Engine=   META&lt;BR /&gt;      Access=   READONLY&lt;BR /&gt;      Physical Name= PKT&lt;BR /&gt;      Schema/Owner= PEGASE</description>
      <pubDate>Wed, 30 Jun 2021 12:54:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751206#M236444</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2021-06-30T12:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql on huge data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751211#M236445</link>
      <description>&lt;P&gt;Bugger! It uses the Meta engine so you would need to use SAS SMC and look in SAS metadata how the library is actually defined and where it points to.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could execute below. That shouldn't take too much time. The log will then tell you if the actual table is in a database. If it's in a database you'll see in the log some trials where SAS tells you which SQL syntax it sent to the database to test if it can execute it, and then also a message telling you which SQL has been chosen to be sent in the end.&lt;/P&gt;
&lt;P&gt;...and if it's a SAS table then you won't have any of these "strange" messages in your SAS log.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options sastrace=',,,d' sastraceloc=saslog nostsuffix;

proc sql outobs=100;
	create table test_2 as
		select d_compta
			from pkt.event
				where '01jan2019 00:00:00'dt &amp;lt;= d_compta &amp;lt; '01jan2020 00:00:00'dt
				;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 13:02:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751211#M236445</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2021-06-30T13:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql on huge data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751215#M236448</link>
      <description>Thank you Patrick,&lt;BR /&gt;I don't have any "strange" message in my SAS log.</description>
      <pubDate>Wed, 30 Jun 2021 13:07:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751215#M236448</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2021-06-30T13:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql on huge data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751216#M236449</link>
      <description>Patrick,&lt;BR /&gt;If this table (pkt.event) was under Data Base, why not using Pass-Through SQL to let DB do the work?</description>
      <pubDate>Wed, 30 Jun 2021 13:07:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751216#M236449</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-06-30T13:07:14Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql on huge data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751220#M236451</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;That's exactly where I was heading to. The query&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/286185"&gt;@SASdevAnneMarie&lt;/a&gt;&amp;nbsp;just executed together with the options would a) have pushed the where clause to the db and b) the SAS log would have told us that this is happening. But from what Marie tells us now it really looks like a SAS table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/286185"&gt;@SASdevAnneMarie&lt;/a&gt;&amp;nbsp;Is this SAS 9.4 or SAS Viya? And how many rows and columns does your source SAS table have? Like: Can you share the result of a Proc Contents? 5+ hours for such a simple query that doesn't require any sorting feels excessive.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 13:16:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751220#M236451</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2021-06-30T13:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql on huge data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751234#M236456</link>
      <description>Thank you Patrick,&lt;BR /&gt;&lt;BR /&gt;It's SAS Enterprise Guide 7.1,  the following code executes correctly, it takes 5 min :&lt;BR /&gt;&lt;BR /&gt;proc sql ;&lt;BR /&gt;	create table db_evenement_2020 as&lt;BR /&gt;		select *&lt;BR /&gt;			from psaeu11.db_evenement&lt;BR /&gt;				where '01jan2019 00:00:00'dt &amp;lt;= d_compta &amp;lt; '01jan2020 00:00:00'dt&lt;BR /&gt;				;&lt;BR /&gt;quit;</description>
      <pubDate>Wed, 30 Jun 2021 13:35:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751234#M236456</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2021-06-30T13:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql on huge data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751248#M236459</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/286185"&gt;@SASdevAnneMarie&lt;/a&gt;&amp;nbsp;From 5 hours to 5 minutes. That's a happy performance improvement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS Enterprise Guide is your SAS Client. The code you issue with SAS Enterprise Guide gets executed on your SAS Server (Compute). This SAS Server is either a SAS 9.x or SAS Viya version.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As you've experienced right now small changes in a where clause can make a big difference. Even though you've told us otherwise that performance improved that much is an indication that your source table resides in a database or in-memory a CAS table (but CAS is SAS Viya and EG version 7.3 is rather a bit too old for a Viya server instance).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The only other reason I can think of where performance increases is when a where clause can use an index. The moment you use any function on an indexed column in a where clause, the index can't get used. So also here reformulating the where clause would explain performance improvement - but I strongly doubt that it would go from 5 hours to 5 minutes with an index on a SAS table (unless the SAS table uses the spde or spds engine).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're going to use this table also for other queries then it might be worth you find someone in your organization who can tell you where the source is stored. If you've got access to the SAS Management Client then you could potentially also find out for yourself by looking in the library manager how the pre-assigned library with libref pkt is actually defined and where it points to.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BTW: If you also want to select 2020 like in your initial post then make sure to change the where clause to&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;.... &amp;lt;'01jan202&lt;STRONG&gt;&lt;FONT face="arial black,avant garde" color="#FF0000"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt; 00:00:00'dt&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you want to improve performance further then don't use select * but list the columns you really want in your select statement.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 14:00:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751248#M236459</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2021-06-30T14:00:22Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql on huge data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751311#M236490</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/286185"&gt;@SASdevAnneMarie&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Thank you Patrick,&lt;BR /&gt;&lt;BR /&gt;It's SAS Enterprise Guide 7.1, the following code executes correctly, it takes 5 min :&lt;BR /&gt;&lt;BR /&gt;proc sql ;&lt;BR /&gt;create table db_evenement_2020 as&lt;BR /&gt;select *&lt;BR /&gt;from psaeu11.db_evenement&lt;BR /&gt;where '01jan2019 00:00:00'dt &amp;lt;= d_compta &amp;lt; '01jan2020 00:00:00'dt&lt;BR /&gt;;&lt;BR /&gt;quit;
&lt;P class="1625072512698"&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;This where clause above calls no functions and is comparing values without any conversions meaning minimum overhead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;where year(datepart(d_compta)) &amp;gt;= 2019
					and year(datepart(d_compta)) &amp;lt;= 2020;&lt;/LI-CODE&gt;
&lt;P&gt;This where clause makes 4 calls to functions for every record; year twice and datepart twice. So 4 times "a huge number of records" is a "huge number of function calls".&lt;/P&gt;
&lt;P&gt;Every function call has overhead to execute.&lt;/P&gt;
&lt;P&gt;You might see a performance improvement with the following because you are halving the number of function calls.&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;where 2019 le  year(datepart(d_compta)) le 2020;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 17:08:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751311#M236490</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-06-30T17:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql on huge data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751638#M236637</link>
      <description>Thank you, Ballardw !</description>
      <pubDate>Fri, 02 Jul 2021 07:45:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751638#M236637</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2021-07-02T07:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql on huge data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751665#M236654</link>
      <description>Sorry, I have a question : my data is like 04/03/1999 09:47:00, when I run the code with the line&lt;BR /&gt; where '01jan2019 00:00:00'dt &amp;lt;= d_compta &amp;lt; '01jan2020 00:00:00'dt &lt;BR /&gt;it takes much more times beacause I don't have the  00:00:00 in my data. &lt;BR /&gt;&lt;BR /&gt;There is some option when I don't want to analyse 00:00:00 ? I don't want to run the datepart function beacause the execution takes alot of time to run.&lt;BR /&gt;Thank you very much !</description>
      <pubDate>Fri, 02 Jul 2021 09:41:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751665#M236654</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2021-07-02T09:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql on huge data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751851#M236746</link>
      <description>&lt;P&gt;There is a difference between the string you see and how SAS deals with SAS datetime values internally.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS Datetime values are nothing else than numerical values representing the count of seconds since 1Jan1960 beginning of the day.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;'01jan2019 00:00:00'dt is SAS syntax that will convert the string in quotes into such a numerical value and that's then what SAS uses for the where clause.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you want to use another datetime string like '04Mar1999 09:47:00'dt things work exactly the same. The string pattern of ddmonyyyy hh:mm:ss is what you must use with this syntax. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you're dealing with another datetime string pattern then you need the input() function together with an informat - and if there is no suitable informat then you need eventually to modify the text string prior to applying an available informat.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;SAS Formats are used to print a SAS Datetime value in human readable form. When dealing with Date and Datetime values always ensure that you understand how the data is actually stored. If you look at the data and you see such a datetime string: If the variable use is of type character then it's just a string, if the variable used in numeric then it's a SAS Date (count of days since 1Jan1960) ore SAS Datetime value and it's the format applied which makes this number show as a data/datetime.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Jul 2021 03:15:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql-on-huge-data/m-p/751851#M236746</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2021-07-03T03:15:29Z</dc:date>
    </item>
  </channel>
</rss>

