Query Dispatcher
The function of the Dispatcher is to route the query request to either CQE or SQE, depending on the attributes of the query. All queries are processed by the Dispatcher and you cannot bypass it.
Currently, the Dispatcher will route an SQL statement to CQE if it find that the statement references or contains any of the following:
INSERT WITH VALUES statement or the target of an INSERT with subselect statement
NLSS or CCSID translation between columns
Lateral correlation
Logical files
Datalink columns
Tables with Read Triggers
User-defined table functions
Read-only queries with more than 1000 dataspaces or updateable queries with more than 256 dataspaces.
DB2® Multisystem tables
non-SQL queries, for example the QQQQry API, Query/400, or OPNQRYF
The Dispatcher also has the built-in capability to re-route an SQL query to CQE that was initially routed to SQE. Unless the IGNORE_DERIVED_INDEX option with a parameter value of *YES is specified, a query will typically be reverted back to CQE from SQE whenever the Optimizer processes table objects that have any of the following logical files or indexes defined:
Logical files with the SELECT/OMIT DDS keyword specified
Non-standard indexes or derived keys, for example logical files specifying the DDS keywords RENAME or Alternate Collating Sequence (ACS) on any field referenced in the key
Sort Sequence NLSS specified for the index or logical file
As new functionality is added in the future, the Dispatcher will route more queries to SQE and increasingly fewer to CQE.