Configuring SQL Optimization
- Install an ODBC driver and configure a data source for the database you want to use. See the topic Data Access for more information.
- Create a stream that uses a source node to pull data from that database.
- Check to be sure that SQL generation is enabled on the client and server, if applicable. It is enabled by default for both.
To Enable SQL Optimization on the Client
- From the Tools menu, choose .
- Click the Optimization tab. Select Generate SQL to enable SQL optimization. Optionally, you can select other settings to improve performance. See the topic Client Performance and Optimization Settings for more information.
To Enable SQL Optimization on the Server
Because server settings override any specifications made on the client, the server configuration settings Stream Rewriting and Automatic SQL Generation must both be turned on. For more information about how to change IBM® SPSS® Modeler Server settings, see the section Performance/Optimization. Note that if these settings are disabled in the server, then the client cannot enable them. But if they are enabled in the server, the client can choose to disable them.
To Enable Optimization When Scoring Models
For purposes of scoring, SQL generation must be enabled separately for each modeling node, regardless of any server or client-level settings. This is done because some models generate extremely complex SQL expressions that may not be evaluated effectively within the database. The database may report errors when trying to execute the generated SQL, due to the size or complexity of the SQL.
A certain amount of trial-and-error may be needed to determine whether SQL generation improves performance for a given model. This is done on the Settings tab after adding a generated model to a stream.