<?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: Upload Performance MATables to MS SQL Server in SAS Customer Intelligence</title>
    <link>https://communities.sas.com/t5/SAS-Customer-Intelligence/Upload-Performance-MATables-to-MS-SQL-Server/m-p/651275#M1555</link>
    <description>Hi FK1,&lt;BR /&gt;Using bulk load with the SAS/Access to SQL Server is a little different to other access engines - your libname statement says SQLSVR so you are using this not SAS/Access to ODBC.&lt;BR /&gt;Firstly you should use the ODBC driver that is provided by SAS, which includes bulk loading capabilities (it looks like you are using the Microsoft driver):&lt;BR /&gt;[A screenshot of a social media post  Description automatically generated]&lt;BR /&gt;Secondly in the ODBC DSN configuration, using the SAS provided driver, you have the ability to configure bulk load:&lt;BR /&gt;[A screenshot of a cell phone  Description automatically generated]&lt;BR /&gt;And lastly, even though you have configured bulk load in the driver, you don't reference BULKLOAD in the library/dataset options or in your case in the Business Context Options, you reference INSERTBUFF and DBCOMMIT.&lt;BR /&gt;I did a test using a combination of Driver Bulk load, INSERTBUFF and DBCOMMIT. In the test I loaded something resembling an MATables (single numeric column) with 6 million records, using Enterprise Guide and PROC APPEND (which is what maupload stored process uses):&lt;BR /&gt;[INSERTBUF=32767] : 3 min 4 seconds&lt;BR /&gt;[INSERTBUF=32767 + DBCOMMIT=0] : 2 min 40 seconds&lt;BR /&gt;[Driver Bulk load + INSERTBUF=32767] : 1 min 10 seconds&lt;BR /&gt;[Driver Bulk load + INSERTBUF=32767 + DBCOMMIT=0] : 9 seconds&lt;BR /&gt;I recommend you switch drivers and turn on bulk load within the driver.&lt;BR /&gt;Cheers&lt;BR /&gt;James&lt;BR /&gt;</description>
    <pubDate>Thu, 28 May 2020 04:10:26 GMT</pubDate>
    <dc:creator>JamesAnderson</dc:creator>
    <dc:date>2020-05-28T04:10:26Z</dc:date>
    <item>
      <title>Upload Performance MATables to MS SQL Server</title>
      <link>https://communities.sas.com/t5/SAS-Customer-Intelligence/Upload-Performance-MATables-to-MS-SQL-Server/m-p/650839#M1540</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was wondering, whether there exist any benchmark values regarding upload performance of a MATable-File to MS SQL DAtabase?&lt;BR /&gt;&lt;BR /&gt;Here is, what I do:&lt;BR /&gt;&lt;BR /&gt;I am only refreshing the metadata counts (i.e. MaTables-File) of four nodes:&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FK1_0-1590510089628.jpeg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/39996i8EF333BF95CFCB38/image-size/medium?v=v2&amp;amp;px=400" role="button" title="FK1_0-1590510089628.jpeg" alt="FK1_0-1590510089628.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What CI does in the background ist initializing a Stored Process Session and among other things executing a macro called "MAUPLOAD".&amp;nbsp;&lt;/P&gt;&lt;P&gt;This macrio, in turn, uploads the locally stored MAtable.sas7bdat-file of the MATables-Libary "MATables.THAAEVZZSKRHHRUZT{SASusername}"to the database.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In my case, we are talking of a file that has only one column, but roughly 6.4 million rows.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Even though I am already &lt;EM&gt;pimping&lt;/EM&gt; the sql-query by setting READ- and WRITEBUFFER to 32767 it still takes about 3 minutes:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FK1_1-1590510779530.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/39997i0C42FCBD1920F037/image-size/medium?v=v2&amp;amp;px=400" role="button" title="FK1_1-1590510779530.png" alt="FK1_1-1590510779530.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Shouldn't this be faster?&lt;/P&gt;&lt;P&gt;We are using the ODBC Driver  17 for SQL Server, which apparently is not supporting Bulkload&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FK1_2-1590510955774.jpeg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/39998i54208D122CA5945C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="FK1_2-1590510955774.jpeg" alt="FK1_2-1590510955774.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;, because every time I am trying to Add BULKLOAD = YES as a option within the porperties of the business context,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bc_option.JPG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/40005iC3F5E111CC7825EB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bc_option.JPG" alt="bc_option.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what CI in the background does, is running a STP and executing a macro called "MAVALUPD". There the error happens:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;"BCP=/BULKLOAD= option not supported by this datasource"&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bulkload_option_error.JPG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/40006i34EAF5D85E239E5D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bulkload_option_error.JPG" alt="bulkload_option_error.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Any help would be very much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thx,&lt;/P&gt;&lt;P&gt;FK&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 16:49:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Customer-Intelligence/Upload-Performance-MATables-to-MS-SQL-Server/m-p/650839#M1540</guid>
      <dc:creator>FK1</dc:creator>
      <dc:date>2020-05-26T16:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: Upload Performance MATables to MS SQL Server</title>
      <link>https://communities.sas.com/t5/SAS-Customer-Intelligence/Upload-Performance-MATables-to-MS-SQL-Server/m-p/650872#M1541</link>
      <description>&lt;P&gt;I would recommend you to get rid of the cell nodes after each selection which will create an implict AND between the two selection nodes. The MATables are generated due to the cell nodes. The first cell node is generating the MATable which is uploaded into the database. If you are using cell nodes, MATables will be created and stored in the MATables library. To optimize the query performance, SAS loads the MATable in to the CI_TEMP (dbtmplib) schema on the database and they runs the query generated by the second select node. It is always recommened to have bulk load enabled for dbtmplib library. You are using ODBC which is lacking bulk load. I can see that you have SAS Access to SQL server, you should be using SAS/ACCESS to SQL server instead of ODBC for bulk load.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The best way to improve the performance is to get rid of the cell node which would eliminate the upload.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/Vijay&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 18:29:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Customer-Intelligence/Upload-Performance-MATables-to-MS-SQL-Server/m-p/650872#M1541</guid>
      <dc:creator>infomevijay</dc:creator>
      <dc:date>2020-05-26T18:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: Upload Performance MATables to MS SQL Server</title>
      <link>https://communities.sas.com/t5/SAS-Customer-Intelligence/Upload-Performance-MATables-to-MS-SQL-Server/m-p/650943#M1547</link>
      <description>HI,&lt;BR /&gt;Can you post your version of SAS Marketing Automation, the operating system you are using for the SAS Servers, and which SAS/Access engine you are using (SAS/Access to SQL Server or SAS/Access to ODBC).&lt;BR /&gt;Thanks&lt;BR /&gt;James&lt;BR /&gt;</description>
      <pubDate>Tue, 26 May 2020 23:34:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Customer-Intelligence/Upload-Performance-MATables-to-MS-SQL-Server/m-p/650943#M1547</guid>
      <dc:creator>JamesAnderson</dc:creator>
      <dc:date>2020-05-26T23:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: Upload Performance MATables to MS SQL Server</title>
      <link>https://communities.sas.com/t5/SAS-Customer-Intelligence/Upload-Performance-MATables-to-MS-SQL-Server/m-p/651019#M1549</link>
      <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/195823"&gt;@JamesAnderson&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here, the info, you requested:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SAS-Version: &lt;SPAN class="c systemtitle3"&gt;SAS 9.4 (9.04.01M6P11152018)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="c systemtitle3"&gt;MA-Version : SAS Marketing Automation, Version 6.5,&amp;nbsp; Build Version: 9.04.01M0P060816&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="c systemtitle4"&gt;OS: WIN (X64_DSRV16) - Windows 2016 Server, 64 bit&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;SPAN class="c systemtitle4"&gt;SAS-Access:&lt;/SPAN&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="c systemtitle4"&gt;SAS/ACCESS Interface to PC Files&lt;BR /&gt;SAS/ACCESS Interface to Microsoft SQL Server&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2020 09:31:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Customer-Intelligence/Upload-Performance-MATables-to-MS-SQL-Server/m-p/651019#M1549</guid>
      <dc:creator>FK1</dc:creator>
      <dc:date>2020-05-27T09:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: Upload Performance MATables to MS SQL Server</title>
      <link>https://communities.sas.com/t5/SAS-Customer-Intelligence/Upload-Performance-MATables-to-MS-SQL-Server/m-p/651036#M1550</link>
      <description>&lt;P&gt;The SAS/ACCESS engine used for dbtmplib is ODBC engine. You can check the datasource for dbtmplib library, which is SAS_MS_SQL_DB.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="infomevijay_0-1590576417297.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/40028iC38FCA9166F06020/image-size/medium?v=v2&amp;amp;px=400" role="button" title="infomevijay_0-1590576417297.png" alt="infomevijay_0-1590576417297.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The data source SAS_MS_SQL_DB is using ODBC Driver 17 for SQL Server.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="infomevijay_1-1590576462951.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/40029iBF23E14740B3FA53/image-size/medium?v=v2&amp;amp;px=400" role="button" title="infomevijay_1-1590576462951.png" alt="infomevijay_1-1590576462951.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2020 10:48:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Customer-Intelligence/Upload-Performance-MATables-to-MS-SQL-Server/m-p/651036#M1550</guid>
      <dc:creator>infomevijay</dc:creator>
      <dc:date>2020-05-27T10:48:02Z</dc:date>
    </item>
    <item>
      <title>Re: Upload Performance MATables to MS SQL Server</title>
      <link>https://communities.sas.com/t5/SAS-Customer-Intelligence/Upload-Performance-MATables-to-MS-SQL-Server/m-p/651042#M1551</link>
      <description>&lt;P&gt;Yes, the datasource is a ODBC engine. This is because the SAS CI Solution Architect advising us told me, to rather use ODBC engine, than SAS ACCESS to MS SQL. I never understood why ,beause among other things ODBC is not supporting Bulkload!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2020 11:26:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Customer-Intelligence/Upload-Performance-MATables-to-MS-SQL-Server/m-p/651042#M1551</guid>
      <dc:creator>FK1</dc:creator>
      <dc:date>2020-05-27T11:26:08Z</dc:date>
    </item>
    <item>
      <title>Re: Upload Performance MATables to MS SQL Server</title>
      <link>https://communities.sas.com/t5/SAS-Customer-Intelligence/Upload-Performance-MATables-to-MS-SQL-Server/m-p/651238#M1554</link>
      <description>&lt;P&gt;I have always found using the INSERTBUFF option works well for tuning row inserts for SQL Server. I'm also using ODBC. I suggest you start with INSERTBUFF = 10000 then try other values to compare performance.&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2020 22:57:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Customer-Intelligence/Upload-Performance-MATables-to-MS-SQL-Server/m-p/651238#M1554</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-05-27T22:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: Upload Performance MATables to MS SQL Server</title>
      <link>https://communities.sas.com/t5/SAS-Customer-Intelligence/Upload-Performance-MATables-to-MS-SQL-Server/m-p/651275#M1555</link>
      <description>Hi FK1,&lt;BR /&gt;Using bulk load with the SAS/Access to SQL Server is a little different to other access engines - your libname statement says SQLSVR so you are using this not SAS/Access to ODBC.&lt;BR /&gt;Firstly you should use the ODBC driver that is provided by SAS, which includes bulk loading capabilities (it looks like you are using the Microsoft driver):&lt;BR /&gt;[A screenshot of a social media post  Description automatically generated]&lt;BR /&gt;Secondly in the ODBC DSN configuration, using the SAS provided driver, you have the ability to configure bulk load:&lt;BR /&gt;[A screenshot of a cell phone  Description automatically generated]&lt;BR /&gt;And lastly, even though you have configured bulk load in the driver, you don't reference BULKLOAD in the library/dataset options or in your case in the Business Context Options, you reference INSERTBUFF and DBCOMMIT.&lt;BR /&gt;I did a test using a combination of Driver Bulk load, INSERTBUFF and DBCOMMIT. In the test I loaded something resembling an MATables (single numeric column) with 6 million records, using Enterprise Guide and PROC APPEND (which is what maupload stored process uses):&lt;BR /&gt;[INSERTBUF=32767] : 3 min 4 seconds&lt;BR /&gt;[INSERTBUF=32767 + DBCOMMIT=0] : 2 min 40 seconds&lt;BR /&gt;[Driver Bulk load + INSERTBUF=32767] : 1 min 10 seconds&lt;BR /&gt;[Driver Bulk load + INSERTBUF=32767 + DBCOMMIT=0] : 9 seconds&lt;BR /&gt;I recommend you switch drivers and turn on bulk load within the driver.&lt;BR /&gt;Cheers&lt;BR /&gt;James&lt;BR /&gt;</description>
      <pubDate>Thu, 28 May 2020 04:10:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Customer-Intelligence/Upload-Performance-MATables-to-MS-SQL-Server/m-p/651275#M1555</guid>
      <dc:creator>JamesAnderson</dc:creator>
      <dc:date>2020-05-28T04:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: Upload Performance MATables to MS SQL Server</title>
      <link>https://communities.sas.com/t5/SAS-Customer-Intelligence/Upload-Performance-MATables-to-MS-SQL-Server/m-p/651281#M1556</link>
      <description>&lt;P&gt;Looks like the screenshots of the drivers got dropped...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Driver type" style="width: 578px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/40061iB54EE656D900A9E9/image-size/large?v=v2&amp;amp;px=999" role="button" title="odbc_driver.png" alt="Driver type" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Driver type&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bulk load config" style="width: 514px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/40062i28EEE1D2F86E7D7C/image-size/large?v=v2&amp;amp;px=999" role="button" title="odbc_driver_config.png" alt="Bulk load config" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Bulk load config&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2020 04:25:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Customer-Intelligence/Upload-Performance-MATables-to-MS-SQL-Server/m-p/651281#M1556</guid>
      <dc:creator>JamesAnderson</dc:creator>
      <dc:date>2020-05-28T04:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: Upload Performance MATables to MS SQL Server</title>
      <link>https://communities.sas.com/t5/SAS-Customer-Intelligence/Upload-Performance-MATables-to-MS-SQL-Server/m-p/651377#M1557</link>
      <description>&lt;P&gt;Hello James,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is exactly, what I was looking for!&lt;BR /&gt;I applied all the recommendations from you and this is the result &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Summary Statistics for SQLSVR are:&lt;BR /&gt;Total SQL execution seconds were: 7.408242&lt;BR /&gt;Total SQL prepare seconds were: 0.000476&lt;BR /&gt;Total seconds used by the SQLSVR ACCESS engine were 9.406028&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;It really puzzles me, that the CI Solution Architect advised me to use the slow Microsoft Driver rather than the fast SAS ACCESS for SQL Server Driver....&lt;/P&gt;&lt;P&gt;Thank you very much for your quick and very helpful help!&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2020 13:55:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Customer-Intelligence/Upload-Performance-MATables-to-MS-SQL-Server/m-p/651377#M1557</guid>
      <dc:creator>FK1</dc:creator>
      <dc:date>2020-05-28T13:55:14Z</dc:date>
    </item>
  </channel>
</rss>

