Db2 Text Search arguments
Wildcard characters and their expansion limit, the case sensitivity of arguments, and argument options are different types of text search arguments that can all affect query performance.
Wildcard characters
Using a wildcard character
at the beginning of a search term slows query processing. Where possible,
avoid performing searches such as *search_term
or ?search_term
.
Wildcard expansion limit
When a query term includes a wildcard, the query term is expanded so that matching documents are
retrieved. A text index collection might include more distinct matching terms than the wildcard
expansion limit allows. In that case, only the subset of documents that match the already expanded
terms is returned.
This limitation applies to the asterisk (*
) wildcard character.
<queryExpansionLimit>4096</queryExpansionLimit>
Case sensitivity
Text search arguments are
not case sensitive, even if you specify an exact term or phrase by
using double quotation marks. For example, a search for the term "Hamlet"
can return both the Shakespearean play Hamlet
and hamlet
, the term for a small
village.
Search argument options
bank
, the options
of the QUERYLANGUAGE search argument are different: ...CONTAINS(column, 'bank', 'QUERYLANGUAGE=en_US')
and CONTAINS(column, 'bank', 'QUERYLANGUAGE=de_DE')...