<?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 Load data into CAS with FedSql query...or proc sql query? in SAS Viya</title>
    <link>https://communities.sas.com/t5/SAS-Viya/Load-data-into-CAS-with-FedSql-query-or-proc-sql-query/m-p/703104#M754</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;from all documentation read online I found that the FedSql is better than the proc sql in terms of performance.&lt;/P&gt;&lt;P&gt;I have an Oracle DB and I have to create a table with a join between two tables on my DB.&lt;/P&gt;&lt;P&gt;I used the FedSql to retrieve the data with varchar types instead of proc sql.&lt;/P&gt;&lt;P&gt;The problem is that my fedsql is solwer that proc sql.&lt;/P&gt;&lt;P&gt;The structure of my query is:&lt;/P&gt;&lt;P&gt;proc fedsql sessref=casauto;&lt;BR /&gt;create table oralib.tmp_fm{options replace=true replication=0} as&lt;BR /&gt;select * from connection to oralib( mysqlquery);&lt;/P&gt;&lt;P&gt;quit;&lt;BR /&gt;NOTE: Executing action 'fedSql.execDirect'.&lt;BR /&gt;WARNING: CASDAL driver. Creation of a TIMESTAMP column has been requested, but is not supported by the CASDAL driver. A DOUBLE&lt;BR /&gt;PRECISION column will be created instead. A DATETIME format will be associated with the column.&lt;BR /&gt;WARNING: CASDAL driver. Creation of a TIMESTAMP column has been requested, but is not supported by the CASDAL driver. A DOUBLE&lt;BR /&gt;PRECISION column will be created instead. A DATETIME format will be associated with the column.&lt;BR /&gt;NOTE: Table TMP_FM was created in caslib ORALIB with 2391025 rows returned.&lt;BR /&gt;NOTE: Action 'fedSql.execDirect' used (Total process time):&lt;BR /&gt;NOTE: real time 175.846113 seconds&lt;BR /&gt;NOTE: cpu time 26.078261 seconds (14.83%)&lt;BR /&gt;NOTE: total nodes 8 (64 cores)&lt;BR /&gt;NOTE: total memory 754.00G&lt;BR /&gt;NOTE: memory 1.35G (0.18%)&lt;BR /&gt;MPRINT(MACROUPDATE): quit;&lt;BR /&gt;NOTE: PROCEDURE FEDSQL used (Total process time):&lt;BR /&gt;real time 2:55.88&lt;BR /&gt;cpu time 3.55 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With the proc sql:&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;connect to oracle (user="&amp;amp;dbuser" password="&amp;amp;dbpwd" path="&amp;amp;dbPath" DBCLIENT_MAX_BYTES=1 READBUFF=1000);&lt;BR /&gt;create table oralib.tmp_fm as&lt;BR /&gt;select * from connection to oracle(mysqlquery);&amp;nbsp;&lt;/P&gt;&lt;P&gt;disconnect from oracle;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;NOTE: Executing action 'table.tableInfo'.&lt;BR /&gt;NOTE: Action 'table.tableInfo' used (Total process time):&lt;BR /&gt;NOTE: real time 0.018614 seconds&lt;BR /&gt;NOTE: cpu time 0.017000 seconds (91.33%)&lt;BR /&gt;NOTE: total nodes 8 (64 cores)&lt;BR /&gt;NOTE: total memory 754.00G&lt;BR /&gt;NOTE: memory 2.72M (0.00%)&lt;BR /&gt;NOTE: Executing action 'table.tableInfo'.&lt;BR /&gt;NOTE: Action 'table.tableInfo' used (Total process time):&lt;BR /&gt;NOTE: real time 0.019678 seconds&lt;BR /&gt;NOTE: cpu time 0.014038 seconds (71.34%)&lt;BR /&gt;NOTE: total nodes 8 (64 cores)&lt;BR /&gt;NOTE: total memory 754.00G&lt;BR /&gt;NOTE: memory 2.72M (0.00%)&lt;BR /&gt;NOTE: Executing action 'table.columnInfo'.&lt;BR /&gt;NOTE: Action 'table.columnInfo' used (Total process time):&lt;BR /&gt;NOTE: real time 0.023280 seconds&lt;BR /&gt;NOTE: cpu time 0.016972 seconds (72.90%)&lt;BR /&gt;NOTE: total nodes 8 (64 cores)&lt;BR /&gt;NOTE: total memory 754.00G&lt;BR /&gt;NOTE: memory 2.98M (0.00%)&lt;BR /&gt;&lt;BR /&gt;ORACLE_13: Executed: on connection 2&lt;BR /&gt;SELECT statement ORACLE_12&lt;BR /&gt;&lt;BR /&gt;NOTE: Executing action 'table.addTable'.&lt;BR /&gt;NOTE: Table ORALIB.TMP_FM created, with 2391025 rows and 19 columns.&lt;BR /&gt;&lt;BR /&gt;Summary Statistics for ORACLE are:&lt;BR /&gt;Total row fetch seconds were: 73.320074&lt;BR /&gt;Total SQL execution seconds were: 0.009120&lt;BR /&gt;Total SQL prepare seconds were: 0.011830&lt;BR /&gt;Total seconds used by the ORACLE ACCESS engine were 77.744559&lt;BR /&gt;&lt;BR /&gt;MPRINT(MACROUPDATE): disconnect from oracle;&lt;BR /&gt;MPRINT(MACROUPDATE): quit;&lt;BR /&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;BR /&gt;real time 1:17.81&lt;BR /&gt;cpu time 8.99 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my oralib declaration:&lt;/P&gt;&lt;P&gt;caslib oralib notactive&lt;BR /&gt;sessref=casauto&lt;BR /&gt;path="/data/"&lt;BR /&gt;libref=oralib&lt;BR /&gt;datasource=(&lt;BR /&gt;srctype="oracle",&lt;BR /&gt;username="&amp;amp;dbUser.",&lt;BR /&gt;password="&amp;amp;dbPwd.",&lt;BR /&gt;schema="&amp;amp;dbSchema.",&lt;BR /&gt;path="&amp;amp;dbPath.",&lt;BR /&gt;/*NumReadNodes=&amp;amp;nodes., NumWriteNodes=&amp;amp;nodes.*/&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried with&amp;nbsp;NumReadNodes and&amp;nbsp;NumWriteNodes but I have problems with the oracle syntax(in example the sysdate value).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a mistake or some configuration to enhance the performance of the fedsql create table in a cas session?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you all.&lt;/P&gt;</description>
    <pubDate>Wed, 02 Dec 2020 13:51:13 GMT</pubDate>
    <dc:creator>AsSASsin</dc:creator>
    <dc:date>2020-12-02T13:51:13Z</dc:date>
    <item>
      <title>Load data into CAS with FedSql query...or proc sql query?</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Load-data-into-CAS-with-FedSql-query-or-proc-sql-query/m-p/703104#M754</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;from all documentation read online I found that the FedSql is better than the proc sql in terms of performance.&lt;/P&gt;&lt;P&gt;I have an Oracle DB and I have to create a table with a join between two tables on my DB.&lt;/P&gt;&lt;P&gt;I used the FedSql to retrieve the data with varchar types instead of proc sql.&lt;/P&gt;&lt;P&gt;The problem is that my fedsql is solwer that proc sql.&lt;/P&gt;&lt;P&gt;The structure of my query is:&lt;/P&gt;&lt;P&gt;proc fedsql sessref=casauto;&lt;BR /&gt;create table oralib.tmp_fm{options replace=true replication=0} as&lt;BR /&gt;select * from connection to oralib( mysqlquery);&lt;/P&gt;&lt;P&gt;quit;&lt;BR /&gt;NOTE: Executing action 'fedSql.execDirect'.&lt;BR /&gt;WARNING: CASDAL driver. Creation of a TIMESTAMP column has been requested, but is not supported by the CASDAL driver. A DOUBLE&lt;BR /&gt;PRECISION column will be created instead. A DATETIME format will be associated with the column.&lt;BR /&gt;WARNING: CASDAL driver. Creation of a TIMESTAMP column has been requested, but is not supported by the CASDAL driver. A DOUBLE&lt;BR /&gt;PRECISION column will be created instead. A DATETIME format will be associated with the column.&lt;BR /&gt;NOTE: Table TMP_FM was created in caslib ORALIB with 2391025 rows returned.&lt;BR /&gt;NOTE: Action 'fedSql.execDirect' used (Total process time):&lt;BR /&gt;NOTE: real time 175.846113 seconds&lt;BR /&gt;NOTE: cpu time 26.078261 seconds (14.83%)&lt;BR /&gt;NOTE: total nodes 8 (64 cores)&lt;BR /&gt;NOTE: total memory 754.00G&lt;BR /&gt;NOTE: memory 1.35G (0.18%)&lt;BR /&gt;MPRINT(MACROUPDATE): quit;&lt;BR /&gt;NOTE: PROCEDURE FEDSQL used (Total process time):&lt;BR /&gt;real time 2:55.88&lt;BR /&gt;cpu time 3.55 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With the proc sql:&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;connect to oracle (user="&amp;amp;dbuser" password="&amp;amp;dbpwd" path="&amp;amp;dbPath" DBCLIENT_MAX_BYTES=1 READBUFF=1000);&lt;BR /&gt;create table oralib.tmp_fm as&lt;BR /&gt;select * from connection to oracle(mysqlquery);&amp;nbsp;&lt;/P&gt;&lt;P&gt;disconnect from oracle;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;NOTE: Executing action 'table.tableInfo'.&lt;BR /&gt;NOTE: Action 'table.tableInfo' used (Total process time):&lt;BR /&gt;NOTE: real time 0.018614 seconds&lt;BR /&gt;NOTE: cpu time 0.017000 seconds (91.33%)&lt;BR /&gt;NOTE: total nodes 8 (64 cores)&lt;BR /&gt;NOTE: total memory 754.00G&lt;BR /&gt;NOTE: memory 2.72M (0.00%)&lt;BR /&gt;NOTE: Executing action 'table.tableInfo'.&lt;BR /&gt;NOTE: Action 'table.tableInfo' used (Total process time):&lt;BR /&gt;NOTE: real time 0.019678 seconds&lt;BR /&gt;NOTE: cpu time 0.014038 seconds (71.34%)&lt;BR /&gt;NOTE: total nodes 8 (64 cores)&lt;BR /&gt;NOTE: total memory 754.00G&lt;BR /&gt;NOTE: memory 2.72M (0.00%)&lt;BR /&gt;NOTE: Executing action 'table.columnInfo'.&lt;BR /&gt;NOTE: Action 'table.columnInfo' used (Total process time):&lt;BR /&gt;NOTE: real time 0.023280 seconds&lt;BR /&gt;NOTE: cpu time 0.016972 seconds (72.90%)&lt;BR /&gt;NOTE: total nodes 8 (64 cores)&lt;BR /&gt;NOTE: total memory 754.00G&lt;BR /&gt;NOTE: memory 2.98M (0.00%)&lt;BR /&gt;&lt;BR /&gt;ORACLE_13: Executed: on connection 2&lt;BR /&gt;SELECT statement ORACLE_12&lt;BR /&gt;&lt;BR /&gt;NOTE: Executing action 'table.addTable'.&lt;BR /&gt;NOTE: Table ORALIB.TMP_FM created, with 2391025 rows and 19 columns.&lt;BR /&gt;&lt;BR /&gt;Summary Statistics for ORACLE are:&lt;BR /&gt;Total row fetch seconds were: 73.320074&lt;BR /&gt;Total SQL execution seconds were: 0.009120&lt;BR /&gt;Total SQL prepare seconds were: 0.011830&lt;BR /&gt;Total seconds used by the ORACLE ACCESS engine were 77.744559&lt;BR /&gt;&lt;BR /&gt;MPRINT(MACROUPDATE): disconnect from oracle;&lt;BR /&gt;MPRINT(MACROUPDATE): quit;&lt;BR /&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;BR /&gt;real time 1:17.81&lt;BR /&gt;cpu time 8.99 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my oralib declaration:&lt;/P&gt;&lt;P&gt;caslib oralib notactive&lt;BR /&gt;sessref=casauto&lt;BR /&gt;path="/data/"&lt;BR /&gt;libref=oralib&lt;BR /&gt;datasource=(&lt;BR /&gt;srctype="oracle",&lt;BR /&gt;username="&amp;amp;dbUser.",&lt;BR /&gt;password="&amp;amp;dbPwd.",&lt;BR /&gt;schema="&amp;amp;dbSchema.",&lt;BR /&gt;path="&amp;amp;dbPath.",&lt;BR /&gt;/*NumReadNodes=&amp;amp;nodes., NumWriteNodes=&amp;amp;nodes.*/&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried with&amp;nbsp;NumReadNodes and&amp;nbsp;NumWriteNodes but I have problems with the oracle syntax(in example the sysdate value).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a mistake or some configuration to enhance the performance of the fedsql create table in a cas session?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you all.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2020 13:51:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Load-data-into-CAS-with-FedSql-query-or-proc-sql-query/m-p/703104#M754</guid>
      <dc:creator>AsSASsin</dc:creator>
      <dc:date>2020-12-02T13:51:13Z</dc:date>
    </item>
  </channel>
</rss>

