This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
admin:indexing:basicstrategies:criteria [2011/01/13 22:40] els |
— (current) | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | {{page>:top_add&nofooter&noeditbtn}} | ||
| - | ====== Administration: Indexing Strategies ====== | ||
| - | |||
| - | ===== Basic Strategies ===== | ||
| - | |||
| - | [[admin:indexing:basicstrategies:home|Overview]] | | ||
| - | **[[admin:indexing:basicstrategies:criteria|Criteria]]** | | ||
| - | [[admin:indexing:basicstrategies:joins|Table Joins]] | | ||
| - | [[admin:indexing:basicstrategies:aggregations|Aggregations]] | | ||
| - | [[admin:indexing:basicstrategies:orderby|Order By's]] | | ||
| - | [[admin:indexing:basicstrategies:validate|Validating Strategy]] | ||
| - | ---- | ||
| - | |||
| - | ==== Optimizing Criteria ==== | ||
| - | |||
| - | 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. | ||
| - | |||
| - | == 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. | ||
| - | |||
| - | ===== ===== | ||
| - | |||
| - | **[[prev|Prev]]** | **[[next|Next]]** | ||
| - | |||
| - | ====== Additional Resources ====== | ||
| - | |||
| - | See also: | ||
| - | |||
| - | {{page>:admin:see_also&nofooter&noeditbtn}} | ||
| - | |||
| - | {{page>:bottom_add&nofooter&noeditbtn}} | ||