<?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 optimizations with MS T-SQL and robust systems/servers suggestions in Administration and Deployment</title>
    <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241786#M3825</link>
    <description>&lt;P&gt;When comparing do you use "proc compare" ir just programmed SQL statements?&lt;BR /&gt;Proc compare is very sofisticated but dedicated to sas. Needing to run at SAS datasets.&lt;BR /&gt;SQL statements are very generic but less sofisticated.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;It is finding the balance what can be expoited in SQL (and by that in a RDBMS) and what is happening outside.&lt;BR /&gt;&lt;BR /&gt;Missings.... o my: &amp;nbsp;&amp;nbsp; the true/false binary logic (SAS)&amp;nbsp;&amp;nbsp; and the 3 value logic (true/false/unknown-null) of a rdbms.&lt;BR /&gt;You cannot convert those two easilye when using a reversed logic (binary) as of ease of coding.&lt;BR /&gt;When using RDBMS 3 value logic specify the wanted records&amp;nbsp;as and never use a double denial.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SAS claims the null to be translated to SAS as "". Yes that works fine in SAS datasets but not in real rdbms systems.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Jan 2016 06:20:10 GMT</pubDate>
    <dc:creator>jakarman</dc:creator>
    <dc:date>2016-01-05T06:20:10Z</dc:date>
    <item>
      <title>SAS optimizations with MS T-SQL and robust systems/servers suggestions</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241290#M3789</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;Hello, I am primarily a T-SQL user while using SAS to compare data sets to T-SQL tables at times. Are there any other SAS to Microsoft SQL tricks/parallel processing/thread tips to be implemented? SAS seems to work just as good with 2gb of ram as it does with 64gb of ram along with 1 thread vs 8 +. These are larger data sets (2mil vs 11mil records or 10mil vs 10mil etc) for comparison purposes. SGIO flag helps with large vs large but not when its &amp;lt; 2gb vs 10gb then it slows down the query by 25%.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;a. PC running sas: My system has 64gb of ram and 8 cores, I rarely see SAS use 20% cpu usage and it doesn't seem to improve performance to a large extent when allocating more memory to SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;b. server running sql: similar specs but 32 cores, rarely see more than 1-2 cores be used while large sas queries are communicating via procsql and libname to sql.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;questions:&lt;/P&gt;&lt;P&gt;a. I have altered the sas9v.cfg file to various settings and performance is within 1-2 % regardless of settings. Rarely does sas go over 20% cpu usage and even if it does, the real time results are within a few seconds of each other.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;b. It seems that if I give more ram to SAS it doesn't speed things up and in some cases slows it down (seems to take a while to cache the tables to ram which offsets any gains).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;c. when proc sql talks to sql it doesn't appear to use more than 1 or 2 cores or much ram. So my guess is the slow down is pulling the data from sql single threaded.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;changes in sas9v.cfg: (please note buffsize 32k, 64k, 128 have been used, buffno 10-500, mem/sum/sort/realmem sizes 2gb-32gb and the results all appear similar)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;-MEMSIZE 16G&lt;BR /&gt;-realmemsize 8G&lt;BR /&gt;-SORTSIZE 4G&lt;BR /&gt;-sumsize 4G&lt;BR /&gt;-BUFSIZE = 64k&lt;BR /&gt;-UBUFSIZE = 64k&lt;BR /&gt;-IBUFSIZE = 32767&lt;BR /&gt;-UBUFNO = 20&lt;BR /&gt;-IBUFNO = 20&lt;BR /&gt;-BUFNO = 40&lt;BR /&gt;-CPUCOUNT = actual&lt;BR /&gt;-THREADS&lt;BR /&gt;-dbsliceparm=all&lt;/P&gt;&lt;P&gt;-sascmd="sas"&lt;BR /&gt;-ALIGNSASIOFILES&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;in sas top of code/script query:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;OPTIONS sascmd="sas";&lt;BR /&gt;OPTIONS THREADS = yes;&lt;BR /&gt;OPTIONS CPUCOUNT = ACTUAL;&lt;BR /&gt;OPTIONS dbsliceparm = all;&lt;BR /&gt;options threads = yes;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;options within the two libname libraries:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;dbsliceparm=all;&lt;BR /&gt;options threads = yes;&lt;BR /&gt;OPTIONS THREADS CPUCOUNT=ACTUAL;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;example code:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table /*local.*/test123 as select&lt;/P&gt;&lt;P&gt;a,b,c,d.... from test1 t1 full outer join test2&lt;/P&gt;&lt;P&gt;on test1.a= test2.a test1.b=test2.b......&lt;/P&gt;&lt;P&gt;where test1.a is not null or test2.b is not null&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Dec 2015 21:12:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241290#M3789</guid>
      <dc:creator>jroe</dc:creator>
      <dc:date>2015-12-30T21:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: SAS optimizations with MS T-SQL and robust systems/servers suggestions</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241305#M3790</link>
      <description>Quick question: is test a SQL Server library? &lt;BR /&gt;If yes, a major part of the processing will take part there,  not in SAS. Use&lt;BR /&gt;Options sastrace=',,,d' sastraceloc=saslog nostsuffix;&lt;BR /&gt;to find out what is executed where.&lt;BR /&gt;When it comes to SAS and performance:&lt;BR /&gt;- memory is utilised espacially when sorting is involved (which will include many join operations)&lt;BR /&gt;- threads: again sorting and aggregating. Also I/O (external databases and the SAS SPDE engine).&lt;BR /&gt;There are quite a few papers on the subject, search on support.Sas.com.</description>
      <pubDate>Wed, 30 Dec 2015 23:02:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241305#M3790</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2015-12-30T23:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: SAS optimizations with MS T-SQL and robust systems/servers suggestions</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241316#M3792</link>
      <description>Yeah. SAS has similar function. Check   PROC FEDSQL  and PROC DS2 ;</description>
      <pubDate>Thu, 31 Dec 2015 01:00:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241316#M3792</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-12-31T01:00:17Z</dc:date>
    </item>
    <item>
      <title>Re: SAS optimizations with MS T-SQL and robust systems/servers suggestions</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241327#M3793</link>
      <description>I read about 40 articles this week ... and about 100 threads, trying to crash course myself a bit. Fedsql will be what I try next, thanks for the feedback. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Similar code in sql works, I may beed to rewrite it a bit if fedsql is literal since tsql and procsql are a little different. Once concern is sas treats '' and nulls as unknowns while sql... nulls are nulls and blanks '' are not nulls although similar. If a column has nulls or '' in sql... sas treats them similary. However sql will treat them differently unless isnull or replacement is performed. I am not sure if fedsql will process nulls and blanks '' (sas style or tsql). The work around is to make sure the tables are consistent with similar values (all nulls or '', not mixed or different for the same columns from two tables). Sas proc sql handles the mix similary on joins.</description>
      <pubDate>Thu, 31 Dec 2015 02:23:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241327#M3793</guid>
      <dc:creator>jroe</dc:creator>
      <dc:date>2015-12-31T02:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: SAS optimizations with MS T-SQL and robust systems/servers suggestions</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241328#M3794</link>
      <description>I will also add Options sastrace=',,,d' sastraceloc=saslog nostsuffix; to config file. I had removed it previously due to libname warnings of being over 260chars ... I had not tried it in the config file.</description>
      <pubDate>Thu, 31 Dec 2015 02:26:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241328#M3794</guid>
      <dc:creator>jroe</dc:creator>
      <dc:date>2015-12-31T02:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: SAS optimizations with MS T-SQL and robust systems/servers suggestions</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241386#M3797</link>
      <description>&lt;P&gt;It looks to me you are getting lost in technical topics but misssing the start with: &amp;nbsp;why what who when where&amp;nbsp; questions as "line".&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Why ...There must be some code that is running and you to process that faster. (wall-clock)&amp;nbsp;&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Where is your data? local in sas-datasets (that is wiht all those sas options) or in a DBMS (sastrace)&lt;/LI&gt;&lt;LI&gt;What is your bottleneck. a/ the external RDBMS network traffic b/ Cpu (don't believe that one)&amp;nbsp; c/ your way of coding (that one hurts) d/ IO speed of the data. e/ ??&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;You need to collect statistics logs on what is going one first.&lt;/LI&gt;&lt;LI&gt;When going into timing issues is good to know what other impact can be arround. Shared resources are everywhere.&lt;/LI&gt;&lt;LI&gt;who is processing what&amp;nbsp; not only you as the intitator of the work but are theres some other services involved?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your background is &lt;A href="https://technet.microsoft.com/en-us/library/ms189826(v=sql.90).aspx" target="_blank"&gt;https://technet.microsoft.com/en-us/library/ms189826(v=sql.90).aspx&lt;/A&gt; ?&lt;BR /&gt;Than there is on big difference&amp;nbsp; SQL DBMS are assumed not to be ordered. For OLTP only hitting a small portion of the data.&lt;BR /&gt;With SAS-datasets access is assumed to be sequential (ordred) hitting all data.&amp;nbsp;You can access both of them in the othere way but that is less known.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Dec 2015 15:25:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241386#M3797</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2015-12-31T15:25:40Z</dc:date>
    </item>
    <item>
      <title>Re: SAS optimizations with MS T-SQL and robust systems/servers suggestions</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241664#M3808</link>
      <description>&lt;P&gt;The bottleneck appears to be when using libname and procsql to compare to tables stored in t-sql (microsoft) dbms. When the queries reach out to SQL they are single threaded. You then see sas when working locally use 2 cores (although never goes over 20% cpu usage) and will utilize the ram settings in the config files.&amp;nbsp;After turning on the logging, the issue appears to be due to using proc sql to compare two libnames that are odbc sql tables. I have not had success yet running "pass through procsql" or "fedsql", due to time and "still learning".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Often SAS will be used against other sas tables or temp tables or may communicate with sql directly. I wanted to leverage as many simple optimizations possible to be flexible for both types of data sources. Thanks for the feedback.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sas messages when comparing the two odbc sql tables:&lt;/P&gt;&lt;P&gt;"ERROR: This SQL statement will not be passed to the DBMS for processing because it involves a&lt;BR /&gt;join across librefs with different connection properties."&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/kb/33/417.html" target="_blank"&gt;http://support.sas.com/kb/33/417.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://support.sas.com/documentation/cdl/en/acreldb/63647/HTML/default/viewer.htm#a002679005.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/acreldb/63647/HTML/default/viewer.htm#a002679005.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and this is most likely when I see locally on my pc cpu jumps when SAS sorts:&lt;/P&gt;&lt;P&gt;NOTE: SAS threaded sort was used.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;fedsql generates this error when re-using the libnames and from the articles I read there were no related solutions that I could find as of last week:&lt;/P&gt;&lt;P&gt;"ERROR: TKTS initialization failed."&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2016 17:04:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241664#M3808</guid>
      <dc:creator>jroe</dc:creator>
      <dc:date>2016-01-04T17:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: SAS optimizations with MS T-SQL and robust systems/servers suggestions</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241699#M3816</link>
      <description>&lt;P&gt;attempting to utiliz sql passthrough for proc sql and I continue to recieve &amp;nbsp;the message "&lt;BR /&gt;ERROR: This SQL statement will not be passed to the DBMS for processing because it involves a&lt;BR /&gt;join across librefs with different connection properties."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;These are&amp;nbsp;two difference databases/schemas on the same server that are being joined (ODBC TO SQL)&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2016 18:18:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241699#M3816</guid>
      <dc:creator>jroe</dc:creator>
      <dc:date>2016-01-04T18:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: SAS optimizations with MS T-SQL and robust systems/servers suggestions</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241732#M3818</link>
      <description>&lt;P&gt;The message is exactly telling you what is happening. You have set up libnames to different part of the SQl database.&lt;/P&gt;&lt;P&gt;As a result all data is processed by downloading it to sas and do all logic there. What you wanted is executing in the database.&lt;BR /&gt;Did you check:&amp;nbsp; &lt;A href="https://support.sas.com/documentation/cdl/en/acreldb/63647/HTML/default/viewer.htm#a003228411.htm&amp;nbsp;" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/acreldb/63647/HTML/default/viewer.htm#a003228411.htm&amp;nbsp;&lt;/A&gt; ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2016 20:30:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241732#M3818</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2016-01-04T20:30:32Z</dc:date>
    </item>
    <item>
      <title>Re: SAS optimizations with MS T-SQL and robust systems/servers suggestions</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241744#M3819</link>
      <description>&lt;P&gt;Thanks for the reply! I have tried the options command without success, I receive the same message.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is the same error true when only comparing two seperate databases in the odbc or is it also true if I was comparing libname (sas) vs libname (odbc) or two sas libnames databases?&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;options dbidirectexec sastraceloc=saslog;&lt;/PRE&gt;</description>
      <pubDate>Mon, 04 Jan 2016 21:15:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241744#M3819</guid>
      <dc:creator>jroe</dc:creator>
      <dc:date>2016-01-04T21:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: SAS optimizations with MS T-SQL and robust systems/servers suggestions</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241748#M3820</link>
      <description>It can only work when all data is in the rdbms sql server and you could run if there.&lt;BR /&gt;In all other cases there is always a download to Sas.&lt;BR /&gt;As you read those notes there are many small reasons why data is downloaded to Sas.</description>
      <pubDate>Mon, 04 Jan 2016 21:31:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241748#M3820</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2016-01-04T21:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: SAS optimizations with MS T-SQL and robust systems/servers suggestions</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241756#M3821</link>
      <description>&lt;P&gt;It helped to find some goof errors by running the query in sql. I had double called the table like:&lt;/P&gt;&lt;P&gt;select mydb.table.name from mydb.table...&lt;/P&gt;&lt;P&gt;fixed it to: select name as name_one from mydbtable&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I then added: options dbidirectexec;&lt;/P&gt;&lt;P&gt;Afterwards I modified the query to use the passthrough connection logic. I believe it is working since I saw sql use multiple cores and my local task manager use &amp;nbsp;less ram/cores (allowing sql to process).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm stuck with how sql and sas differ on handling nulls. In t-sql a null = null and a '' = blank (not a null). In sas a '' blank can represent nulls. So when comparing "a column name from table A vs column name from table B"...:&lt;/P&gt;&lt;P&gt;a. if using sas and not sql pass through: sas handles nulls and '' no problem&lt;/P&gt;&lt;P&gt;b. when you run the same queries in sql, if a.name = null and b.name= '', then they are not the same (a full outerjoin would display both results).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So this is why sas is handy (if one programm keeps nulls as nulls and another casts nulls as blanks...) sas can handle it when doing a comparison. Sql you need to cast them all to be nulls or blanks (the same).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I now need to figure out how to have SAS handle the nulls/blanks but pass the processing power to sql.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://analytics.ncsu.edu/sesug/2001/P-109.pdf" target="_blank"&gt;http://analytics.ncsu.edu/sesug/2001/P-109.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appologize if this doesn't make sense, it is difficult to describe in writing.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2016 22:30:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241756#M3821</guid>
      <dc:creator>jroe</dc:creator>
      <dc:date>2016-01-04T22:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: SAS optimizations with MS T-SQL and robust systems/servers suggestions</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241759#M3822</link>
      <description>&lt;P&gt;I am going to guess the gains in the select directly from sql and make the joins there are neglible in this case because it takes "40 seconds" to create one of the tables in sas on its own, and another 40 seconds to do the other (80 sec total).... while the time it takes to process evertyhing using the current code in SAS is only 2 minutes. From what I have read is that when it tries to join the two tables from different libnames, it then backs out and builds the tables in SAS anyway.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would be neat to see how I could take two "work/temp" tables from SAS and then post it to sql with passthrough rather than SAS. I'll have to learn some more.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;update: I also hoped to use&amp;nbsp;DIRECT_SQL=NO; and other various direct_Sql options so that the queries would be multithreaded in sql but sas would perform the joins which does not seem to be accurate (still slow)&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2016 23:27:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241759#M3822</guid>
      <dc:creator>jroe</dc:creator>
      <dc:date>2016-01-04T23:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: SAS optimizations with MS T-SQL and robust systems/servers suggestions</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241773#M3823</link>
      <description>&lt;P&gt;I am giving up for now but if anyone has ideas on how proc sql can kick off multithreading in sql with just using libname please pass it on. It almost seems like whatever SAS does tells MS SQL to "not use multithreading".&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2016 00:27:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241773#M3823</guid>
      <dc:creator>jroe</dc:creator>
      <dc:date>2016-01-05T00:27:17Z</dc:date>
    </item>
    <item>
      <title>Re: SAS optimizations with MS T-SQL and robust systems/servers suggestions</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241779#M3824</link>
      <description>&lt;P&gt;Did you try Pass Through &amp;nbsp;way &amp;nbsp;to pass MS-SQL statement into SQL Database ? Do not use SAS itself SQL .&lt;/P&gt;
&lt;P&gt;I am not sure if it could work , but deserve a try.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2016 01:06:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241779#M3824</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-01-05T01:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: SAS optimizations with MS T-SQL and robust systems/servers suggestions</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241786#M3825</link>
      <description>&lt;P&gt;When comparing do you use "proc compare" ir just programmed SQL statements?&lt;BR /&gt;Proc compare is very sofisticated but dedicated to sas. Needing to run at SAS datasets.&lt;BR /&gt;SQL statements are very generic but less sofisticated.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;It is finding the balance what can be expoited in SQL (and by that in a RDBMS) and what is happening outside.&lt;BR /&gt;&lt;BR /&gt;Missings.... o my: &amp;nbsp;&amp;nbsp; the true/false binary logic (SAS)&amp;nbsp;&amp;nbsp; and the 3 value logic (true/false/unknown-null) of a rdbms.&lt;BR /&gt;You cannot convert those two easilye when using a reversed logic (binary) as of ease of coding.&lt;BR /&gt;When using RDBMS 3 value logic specify the wanted records&amp;nbsp;as and never use a double denial.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SAS claims the null to be translated to SAS as "". Yes that works fine in SAS datasets but not in real rdbms systems.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2016 06:20:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241786#M3825</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2016-01-05T06:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: SAS optimizations with MS T-SQL and robust systems/servers suggestions</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241825#M3828</link>
      <description>&lt;P&gt;yesterday I got it to work which was cool but ended up being slow due to null vs '' (blanks) in the data which are handled seperately in sql while sas will help leverage them and treat them the same. I wanted to use sas to compare two tables (one created from sas and exported to sql and another created in sql)... when the query is executed in sql it takes a while since it will return results (mismatches since null and '' are not the same). Sas helps treat them the same and was much faster since there were no mismatches in that regard.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However when using pass through procsql I was able to see 16 cores used on the sql server vs normal procsql (1 core). I would like to see procsql even though it wont perform the join without passthrough use the multiple cores on the server. I'm not sure if it is a limitation of how procsql communicates on odbc but it is odd that MS SQL doesn't optimize the procsql queries for multithreading unless passthrough is used yet still allows the data to be read.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have not been able to find a way for SAS during procsql selects without fedsql or passthrough be able to use more than one core on the SQL server(MS TSQL). All of the optimizations primarily appear to effect local pc sas performance and not the connected library via odbc to MS TSQL.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2016 16:55:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241825#M3828</guid>
      <dc:creator>jroe</dc:creator>
      <dc:date>2016-01-05T16:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: SAS optimizations with MS T-SQL and robust systems/servers suggestions</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241848#M3829</link>
      <description>&lt;P&gt;When you are trying to optimize read speed look also at : dbslice dbsliceparm, &amp;nbsp;&lt;A href="https://support.sas.com/documentation/cdl/en/acreldb/63647/HTML/default/viewer.htm#a002316130.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/acreldb/63647/HTML/default/viewer.htm#a002316130.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This only helps when&amp;nbsp;the other bottlenecks are not more important.&lt;BR /&gt;Reading all dat unsorted from a DBMS can be very fast, In those&amp;nbsp;situations you are adding overhead by wanting to run threads.&lt;/P&gt;&lt;P&gt;The sequential IO reading data in that order from&amp;nbsp;disk is hardly to be improved. In contrary it is getting slowed down (spinning ones)&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2016 16:04:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241848#M3829</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2016-01-05T16:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: SAS optimizations with MS T-SQL and robust systems/servers suggestions</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241860#M3832</link>
      <description>&lt;P&gt;I have tested those and currently have them included in the config file, options and libname. It helped locally in SAS on the workstation to use more than one core but not in SQL on the MS SQL server where only one core is being used when SAS code is executed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem appears to be select statements are coming over single threaded to the MS SQL server. If you run a similar select statement 8-16 cores are used in SQL.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The procsql over odbc appears to use minimal resources when pulling data from the server except when sql passthrough specifically.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this case the data is pulled from two different libnames and the warning emerges that the joins will be processed in SAS, I tried several directsql commands and they had no effects on the SQL server side of the pull. It appears that the ODBC sas pull from the select is only single threaded on the server (although multithreaded slightly locally).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Locally maybe 1-5% of the performance is increased with all the optimizations and the cpu usage goes up. The real gains would occur if during the procsql select it used multithreading on the server possibly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2016 16:54:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/241860#M3832</guid>
      <dc:creator>jroe</dc:creator>
      <dc:date>2016-01-05T16:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: SAS optimizations with MS T-SQL and robust systems/servers suggestions</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/242377#M3850</link>
      <description>&lt;P&gt;an item of note with sql libnames... the "optimizations" need to be added before the scema and not within the quotes section or it was ignored. No notice in performance but for statements&amp;nbsp;I could see them in action in the log only if I placed them outside the quotes... if you set an invalid value within the quotes it would allow it (ignored) and fail if outside unless set to a proper setting.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ROWSET_SIZE= 3276731; &amp;nbsp; is invalid and ignored...&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;LIBNAME test&amp;nbsp;ODBC NOPROMPT =&lt;BR /&gt;"Driver=SQL Server Native Client 10.0;&lt;BR /&gt;Server=tester;&lt;BR /&gt;Database=test1;&lt;BR /&gt;ROWSET_SIZE= 3276731; &amp;nbsp;&lt;BR /&gt;Trusted_Connection=Yes;"&lt;BR /&gt;dbsliceparm=(all,4)&lt;BR /&gt;ROWSET_SIZE= 32767&lt;BR /&gt;readbuff= 32767&lt;BR /&gt;Schema = test123;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2016 15:00:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-optimizations-with-MS-T-SQL-and-robust-systems-servers/m-p/242377#M3850</guid>
      <dc:creator>jroe</dc:creator>
      <dc:date>2016-01-08T15:00:37Z</dc:date>
    </item>
  </channel>
</rss>

