This is an old revision of the document!


Administration: Indexing Strategies

Basic Strategies

Optimizing Criteria

Criteria is usually optimized by creating indexes on each column involved in the WHERE clause of a SQL statement. This is true regardless of the use of Boolean operators or parentheses. Normally, these will be installed with basic Omnidex indexes; however, some columns may contain textual data and would benefit from QuickText indexes.

The following examples show how to evaluate queries and choose the Omnidex indexes. Below the examples is an Omnidex Environment File that will generate these indexes.

Example 1. Basic Criteria

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.

Example 2. Textual Criteria

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.

Example 3. Case Sensitivity

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.

Additional Resources

See also:

 
Back to top
admin/indexing/basicstrategies/criteria.1294959507.txt.gz ยท Last modified: 2012/10/26 14:52 (external edit)