DEFAULT_LIKE_RANGE_SELECTIVITY option

Function

Provides default selectivity estimates to the optimizer for leading constant LIKE predicates.

Allowed values

0 to 100

Scope

Can be set for an individual connection or the PUBLIC group. Takes effect immediately.

Default

15

Description

DEFAULT_LIKE_RANGE_SELECTIVITY sets the default selectivity for LIKE predicates, of the form LIKE 'string%' where the match string is a set of constant characters followed by a single wildcard character (%). The optimizer relies on this option when other selectivity information is not available.

Note that if the column has either a LF index or a 1 or 2 byte FP index, the optimizer can get exact information and does not need to use this value.

Users can also specify selectivity in the query, as described in the section “User-supplied estimates” of the “Search conditions” section in Chapter 3, “SQL Language Elements.”

See also

“DEFAULT_LIKE_MATCH_SELECTIVITY option”

“LIKE conditions” of the “Search conditions” section in Chapter 3, “SQL Language Elements”

Chapter 3, “Improving Query Performance” in the Sybase IQ Performance and Tuning Guide