This is an old revision of the document!
Criteria is usually optimized by creating indexes on each column. This is true regardless of the use of Boolean operators or parentheses. As you consider the query patterns, look for opportunities to use QuickText indexes or indexing options.
In the following statement, look for the columns used as criteria in the WHERE clause
select NAME, ADDRESS1, ADDRESS2, PHONE
from INDIVIDUALS
where ((STATE = 'CO' and CITY = 'Boulder') or
(STATE = 'IL' and CITY = 'Chicago'))
The STATE and CITY columns should be Omnidex indexes.
In this example, you might want to use QuickText indexes.
select NAME, ADDRESS1, ADDRESS2, PHONE from INDIVIDUALS where STATE = 'CO' and NAME = 'John'
The STATE column should be an Omnidex index and the NAME column should be a Quicktext index.
In this same example, we might want to allow case insensitivity.
select NAME, ADDRESS1, ADDRESS2, PHONE from INDIVIDUALS where STATE = 'co' and NAME = 'john'
The STATE column should be an Omnidex index with the Case Insensitive option, and the NAME column should be a QuickText index. QuickText indexes are automatically case insensitive.
See also: