Entering content frame

Background documentation Search Conditions Locate the document in the library structure

The Optimizer can only optimize data access for those SQL statements that contain a search condition. A search condition is defined with a WHERE clause.

Example

SELECT name

FROM customer

WHERE city = 'Seattle' AND zip > 98101

You can combine the following SQL key words with a search condition: SELECT, UPDATE, DELETE, INSERT.

Caution

Some search condition restrictions apply to UPDATE statements.

The form of the search condition has a significant effect on the costs incurred by executing the SQL statement. When determining costs for an SQL statement, the Optimizer only considers the following search conditions:

·        Equality condition

·        Range condition

·        IN condition

·        LIKE condition

If the search conditions in an SQL statement cannot be transformed into one of the forms listed above, the Optimizer cannot determine a search strategy for them and uses the sequential search instead.

If search conditions are linked using a number of identical Boolean operators, the sequence of these conditions does not affect how the Optimizer determines the search strategy.

 

Leaving content frame