Background documentationIN CONDITION FOR INDEX Locate this document in the navigation structure


IN CONDITION FOR INDEX is a search strategy of the SQL optimizer.

When Can the System Use This Strategy?

The system can use this strategy if equality conditions were specified for the first k-1 columns of an index, and an IN condition was specified for the kth column of an index (1 ≤ k < n, n = number of index columns). Multiple IN conditions can be specified for one index; the system then processes the second IN condition with one range only.

If the values in the IN condition are close together, or if many values were specified, the database system might use a range condition instead of an equality condition.

How Does the System Access the Data?

The database system processes the individual values of the IN condition as an equality condition. Using the inversion lists, the database system accesses the table rows directly. The database system creates an intermediate result set.