<?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: Simple SAS queries continue to run single threaded in MS SQL with Async_Network_IO wait types in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Simple-SAS-queries-continue-to-run-single-threaded-in-MS-SQL/m-p/593547#M15533</link>
    <description>&lt;P&gt;Anyone else resolve the Async_Network_IO wait types?&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sqlshack.com/reducing-sql-server-async_network_io-wait-type/" target="_blank"&gt;https://www.sqlshack.com/reducing-sql-server-async_network_io-wait-type/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I observe parallel processing working and no wait types when an aggregate summary is utilized or more complex where statements (data is computed on SQL server then brought back to SAS).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For simple requests such as "select a-z from SQL and create a new table in SAS" appear to be "single threaded/core" on SQL and generate the async_network_IO wait which reduces performance. Primarily this occurs when the application (SAS) cannot keep up with the data being sent from SQL .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I feel like I have exhausted all libname and proc sql hints to alleviate this bottleneck.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 03 Oct 2019 14:28:47 GMT</pubDate>
    <dc:creator>JroeJroe</dc:creator>
    <dc:date>2019-10-03T14:28:47Z</dc:date>
    <item>
      <title>Simple SAS queries continue to run single threaded in MS SQL with Async_Network_IO wait types</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Simple-SAS-queries-continue-to-run-single-threaded-in-MS-SQL/m-p/592185#M15327</link>
      <description>&lt;P&gt;Concern 1: how to reduce async_network_io (allow sas to read rows quicker so it can keep up with sql)&lt;/P&gt;&lt;P&gt;Concern 2: how to have SAS's code sent to the MS SQL server utilize parallel processing (instead of 1 core)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have utilized various options and hints to encourage SAS to utilize parallel processing, however the code continues to utilize 1 cpu core (SQL is set to MAXDOP = &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; and single threaded. The same queries ran in MS SQL directly run in 10% of the time than SAS.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a hint or driver that would resolve this issue? I have observed the same issue with the "SQL driver", "Natural SQL Driver 11.0 and 10.0" and the latest "ODBC Driver 17 for SQL Server".&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The select/create table statement should be pulling the data down from sql multi/parallel threaded, any assistance? Thanks a ton!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* tried with and without option flags */
OPTIONS BUFNO=1000;
OPTIONS VBUFSIZE=1024K;
OPTIONS UBUFNO=20;
OPTIONS UBUFSIZE=1024K;
OPTIONS IBUFSIZE=32767;
OPTIONS IBUFNO=100;
OPTIONS BUFSIZE=64k;
OPTIONS THREADS CPUCOUNT=6; 
OPTIONS THREADS=YES;

/* tried with and without libname options */

LIBNAME MYSCHEMA ODBC NOPROMPT = 
"Driver=ODBC Driver 17 for SQL Server;
Server=MYSERVER; 
BULKLOAD=YES;
READBUFF=32767;
DBOMMIT=32767;
INSERTBUFF=32767;
ROWSET_SIZE=32767;
Database=MYDATABASE;
DBSLICEPARM=all;
THREADS=yes;
CPUCOUNT=8;
Trusted_Connection=Yes;
" 
Schema = MYSCHMEA;

/* example - however I am selecting about 30-50 columns
also tried proc sql THREADS; without noticing a change.
 */

proc sql;
Create table simple_Test as SELECT
a
,b
,c
,d
,e
,f
,g
FROM MySCHEMA.MYTABLE
; quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Installed sas plugins:&lt;/P&gt;&lt;P&gt;For Base SAS Software ...&lt;BR /&gt;Custom version information: 9.4_M6&lt;BR /&gt;Image version information: 9.04.01M6P110718&lt;BR /&gt;For SAS/STAT ...&lt;BR /&gt;Custom version information: 15.1&lt;BR /&gt;For SAS/GRAPH ...&lt;BR /&gt;Custom version information: 9.4_M6&lt;BR /&gt;For SAS/CONNECT ...&lt;BR /&gt;Custom version information: 9.4_M6&lt;BR /&gt;For High Performance Suite ...&lt;BR /&gt;Custom version information: 2.2_M7&lt;BR /&gt;For SAS/ACCESS Interface to PC Files ...&lt;BR /&gt;Custom version information: 9.4_M6&lt;BR /&gt;For SAS/ACCESS Interface to ODBC ...&lt;BR /&gt;Custom version information: 9.4_M6&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2019 15:02:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Simple-SAS-queries-continue-to-run-single-threaded-in-MS-SQL/m-p/592185#M15327</guid>
      <dc:creator>JroeJroe</dc:creator>
      <dc:date>2019-09-27T15:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: Simple SAS queries continue to run single threaded in MS SQL with Async_Network_IO wait types</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Simple-SAS-queries-continue-to-run-single-threaded-in-MS-SQL/m-p/592249#M15334</link>
      <description>Have you tried using fedsql?&lt;BR /&gt;&lt;A href="https://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=proc&amp;amp;docsetTarget=n18135hihi4fi0n1ra7ge29nh3hw.htm&amp;amp;locale=en" target="_blank"&gt;https://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=proc&amp;amp;docsetTarget=n18135hihi4fi0n1ra7ge29nh3hw.htm&amp;amp;locale=en&lt;/A&gt;&lt;BR /&gt;and &lt;A href="https://support.sas.com/resources/papers/proceedings15/3390-2015.pdf" target="_blank"&gt;https://support.sas.com/resources/papers/proceedings15/3390-2015.pdf&lt;/A&gt;</description>
      <pubDate>Fri, 27 Sep 2019 17:22:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Simple-SAS-queries-continue-to-run-single-threaded-in-MS-SQL/m-p/592249#M15334</guid>
      <dc:creator>JosvanderVelden</dc:creator>
      <dc:date>2019-09-27T17:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: Simple SAS queries continue to run single threaded in MS SQL with Async_Network_IO wait types</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Simple-SAS-queries-continue-to-run-single-threaded-in-MS-SQL/m-p/592258#M15336</link>
      <description>&lt;P&gt;Thanks for the response. I primarily utilize SSMS directly as a DBA. However assisting SAS users with their code (who would not convert to federated sql) , I would like the queries to consistently utilize parallel processing (on the sql server) when they use sas data steps or proc sql.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I believe it may be single threaded as a "select" statement without computations occurring on the server (Group by/sum etc) . A large bottleneck is the async_network_io wait type that is observed in sql. This is due to sql processing data faster than SAS will retrieve it and I am not sure how to alleviate that pressure.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2019 17:47:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Simple-SAS-queries-continue-to-run-single-threaded-in-MS-SQL/m-p/592258#M15336</guid>
      <dc:creator>JroeJroe</dc:creator>
      <dc:date>2019-09-27T17:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: Simple SAS queries continue to run single threaded in MS SQL with Async_Network_IO wait types</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Simple-SAS-queries-continue-to-run-single-threaded-in-MS-SQL/m-p/593547#M15533</link>
      <description>&lt;P&gt;Anyone else resolve the Async_Network_IO wait types?&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sqlshack.com/reducing-sql-server-async_network_io-wait-type/" target="_blank"&gt;https://www.sqlshack.com/reducing-sql-server-async_network_io-wait-type/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I observe parallel processing working and no wait types when an aggregate summary is utilized or more complex where statements (data is computed on SQL server then brought back to SAS).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For simple requests such as "select a-z from SQL and create a new table in SAS" appear to be "single threaded/core" on SQL and generate the async_network_IO wait which reduces performance. Primarily this occurs when the application (SAS) cannot keep up with the data being sent from SQL .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I feel like I have exhausted all libname and proc sql hints to alleviate this bottleneck.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2019 14:28:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Simple-SAS-queries-continue-to-run-single-threaded-in-MS-SQL/m-p/593547#M15533</guid>
      <dc:creator>JroeJroe</dc:creator>
      <dc:date>2019-10-03T14:28:47Z</dc:date>
    </item>
  </channel>
</rss>

