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. It cannot be bypassed.

Currently, the dispatcher routes queries to SQE unless it finds that the query references or contains any of the following:

  • INSERT WITH VALUES statement or the target of an INSERT with subselect statement
  • Tables with Read triggers
  • Read-only queries with more than 1000 dataspaces, or updatable queries with more than 256 dataspaces.
  • DB2® Multisystem tables
  • QQQQry API

For other non-SQL queries, for example Query/400 or OPNQRYF, the routing of the query can be controlled by the QAQQINI SQE_NATIVE_ACCESS option. See "table 46".