Details about in-database optimization
In-database optimization avoids copying IDs from the database to the IBM® Campaign server for processing whenever possible. This option can improve flowchart performance.
In-database optimization determines:
*
*
When in-database optimization is on:
*
*
In-database optimization affects CPU consumption:
*
*
You can apply in-database optimization globally and override the global setting for individual flowcharts. The best practice is to turn off the global configuration property (useInDbOptimization) and set the option at the flowchart level (Advanced Settings > Admin > Use In-DB Optimization during Flowchart Run).
*
Limitations of in-database optimization
*
*
Depending on the logic that is required, some functions are still performed on the IBM® Campaign server, even with in-database processing turned on. Some examples are given below:
*
For example, if a Select process queries different data sources, IBM® Campaign automatically stores the ID lists for those cases on the application server.
*
For example, to calculate a derived field, IBM® Campaign evaluates the derived field formula to see whether any part of the calculation can be performed with SQL. If simple SQL statements can be used, the calculation is done in-database. If not, temporary tables are created on the IBM® Campaign server to handle the calculations and persist the results from process to process within a flowchart.
Processing raw SQL in macros
Custom macros that consist of raw SQL statements can be processed in-database, within the following guidelines:
*
All raw SQL custom macros must begin with select and contain exactly one from in the rest of the text.
*
For databases that only support insert into <TempTable> syntax, you must map at least one base table to the same data source at the same audience level as the raw SQL custom macro. If the fields that are selected by the raw SQL custom macro are too large for the fields of the temp table, a runtime error occurs.
*
If you use a raw SQL query in a Select process that has an input cell, you must use the <TempTable> token to obtain the correct list of audience IDs. Also use the <OutputTempTable> token to prevent audience IDs from being retrieved from the database back to the IBM® Campaign server.
*