Show TOC

SUBQ CONDITION FOR KEYLocate this document in the navigation structure


SUBQ CONDITION FOR KEY is a search strategy of the SQL optimizer.

When Can the System Use This Strategy?

The database system uses this search strategy if the following conditions are met:

  • The table has only one primary key column.

  • The values for the key column come from a subquery.


  • The table has a primary key in several columns.

  • Equality conditions have been defined for all primary key columns that are located before the column with the subquery in the primary key.

  • On one column of the primary key, an IN condition is defined in the form of a subquery.

How Does the System Access the Data?

The database system performs a sequential search on part of the primary key for each results row of the subquery.