Using the TempTable and OutputTempTable tokens in raw SQL queries
When you use a raw SQL query in a Select process with an input cell, the processing behavior depends on whether in-DB optimization is in use.
*
*
*
When in-DB optimization is enabled: Campaign assumes that the ID list generated from the Select process is the final list.Campaign does not automatically match this list against the ID list of any incoming cell. Therefore, the raw SQL query written for an intermediate Select process (a Select process with an input cell) must use the <TempTable> token to properly join against the incoming cell. Joining against the input cell ensures correct results and improves performance by preventing extraneous processing for audience IDs that are not in the input cell.
*
In addition, use the <OutputTempTable> token to maintain in-DB optimization and prevent the audience IDs from being retrieved from the database back to the Campaign server.
Example: Using the TempTable and OutputTempTable tokens