The entire query might not be passed to the DBMS when you create a Netezza table from an existing Netezza table


When you use SAS/ACCESS® Interface to Netezza to create a Netezza table based on an existing Netezza table, the entire statement might not be passed to the database. This issue might occur even when you use two librefs with the same connection parameters along with the DBIDIRECTEXEC system option.

This issue occurs when the following is true about the code that is being executed:

This problem occurs because SAS breaks the single step of creating a Netezza table from an existing Netezza table into the following steps.

  1. SAS passes the CREATE TABLE statement to Netezza.
  2. A query is constructed and passed to the Database Management System (DBMS) to retrieve the data from the existing Netezza table.
  3. This data is subsequently passed back to Netezza to insert into the newly created table. When this step occurs, the following error might appear in the output written to the SAS log as a result of the SASTRACE system option:
ERROR: This SQL statement will not be passed to the DBMS for processing because it involves a join across librefs with different connection properties.

When the entire statement is not passed to the DBMS, processing might take longer.

The only workaround is to not use DEFER=YES LIBNAME option.