SQL Optimization

One of the most powerful capabilities of IBM® SPSS® Modeler is the ability to perform many data preparation and mining operations directly in the database. By generating SQL code that can be pushed back to the database for execution, many operations, such as sampling, sorting, deriving new fields, and certain types of graphing, can be performed in the database rather than on the IBM SPSS Modeler or IBM SPSS Modeler Server computer. When you are working with large datasets, these pushbacks can dramatically enhance performance in several ways:

Given these advantages, IBM SPSS Modeler is designed to maximize the amount of SQL generated by each stream so that only those operations that cannot be compiled to SQL are executed by IBM SPSS Modeler Server. Because of limitations in what can be expressed in standard SQL (SQL-92), however, certain operations may not be supported. See the topic Tips for Maximizing SQL Generation for more information.

Note: Keep the following information in mind regarding SQL:
  • Because of minor differences in SQL implementation, streams executed in a database may return slightly different results when executed in IBM SPSS Modeler. These differences may also vary depending on the database vendor, for similar reasons. For example, depending on the database configuration for case sensitivity in string comparison and string collation, IBM SPSS Modeler streams executed using SQL pushback may produce different results from those executed without SQL pushback. Contact your database administrator for advice on configuring your database. To maximize compatibility with IBM SPSS Modeler, database string comparisons should be case sensitive.
  • Database modeling and SQL optimization require that IBM SPSS Modeler Server connectivity be enabled on the IBM SPSS Modeler computer. With this setting enabled, you can access database algorithms, push back SQL directly from IBM SPSS Modeler, and access IBM SPSS Modeler Server. To verify the current license status, choose the following from the IBM SPSS Modeler menu.
  • When using IBM SPSS Modeler to generate SQL, it is possible the result using SQL push back is not consistent with IBM SPSS Modeler native on some platforms (Linux/zLinux, for example). The reason is that floating point is handled differently on different platforms.

Help > About > Additional Details

If connectivity is enabled, you see the option Server Enablement in the License Status tab.

See the topic Connecting to IBM SPSS Modeler Server for more information.

Note: When streams are executed in a Netezza database, date and time details are taken from that database. This may differ from your local or IBM SPSS Modeler Server date and time if, for example, the database is on a machine that is located in a different country or time zone.

Database requirements

For the latest information on which databases and ODBC drivers are supported and tested for use with IBM SPSS Modeler, see the product compatibility matrices on the corporate Support site at http://www.ibm.com/support.

Note that you may gain additional performance improvements by using database modeling.

ODBC driver setup

To ensure that time details (such as HH:MM:SS) are processed correctly when using SQL 2012 on Windows 8 32bit systems, when setting up your ODBC SQL Server Wire Protocol Driver, you should select both the Enable Quoted Identifiers and Fetch TWFS as Time options.