This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
dev:sql:statements:create_table:syntax [2010/07/07 21:02] els |
dev:sql:statements:create_table:syntax [2012/10/26 15:00] (current) |
||
|---|---|---|---|
| Line 8: | Line 8: | ||
| [[dev:sql:statements:create_table:home|Overview]] | **[[dev:sql:statements:create_table:syntax|Syntax]]** | [[dev:sql:statements:create_table:examples|Examples]] | [[dev:sql:statements:create_table:home|Overview]] | **[[dev:sql:statements:create_table:syntax|Syntax]]** | [[dev:sql:statements:create_table:examples|Examples]] | ||
| - | |||
| ===== Syntax ===== | ===== Syntax ===== | ||
| Line 88: | Line 87: | ||
| The OPTIONS clause provides options specific to the table. The primary use of the OPTIONS clause is to provide information about a delimited file or an Omnidex Standalone Table. The following article on [[dev:sql:statements:create_table:delimited|delimited files]] gives specific instructions for use of this OPTIONS clause. | The OPTIONS clause provides options specific to the table. The primary use of the OPTIONS clause is to provide information about a delimited file or an Omnidex Standalone Table. The following article on [[dev:sql:statements:create_table:delimited|delimited files]] gives specific instructions for use of this OPTIONS clause. | ||
| - | === PHYSICAL <"filespec" | rdmbs_table> === | + | === PHYSICAL <"filespec" | rdbms_table> === |
| The PHYSICAL clause specifies the location of the data that comprises this table. The PHYSICAL clause varies according to the database type as follows: | The PHYSICAL clause specifies the location of the data that comprises this table. The PHYSICAL clause varies according to the database type as follows: | ||
| Line 305: | Line 304: | ||
| [ PROXIMITY ] | [ PROXIMITY ] | ||
| [ < CASE_INSENSITIVE | CASE_SENSITIVE > ] | [ < CASE_INSENSITIVE | CASE_SENSITIVE > ] | ||
| - | [ EXCLUDED_WORDS ] | ||
| [ PHONETIC ] | [ PHONETIC ] | ||
| - | [ PREJOIN table ] | + | [ PREJOIN table_name ] |
| [ < RECORD_SPECIFIC | RECORD_COMPLEX > ] | [ < RECORD_SPECIFIC | RECORD_COMPLEX > ] | ||
| Line 367: | Line 365: | ||
| == BITMAP == | == BITMAP == | ||
| + | |||
| + | The BITMAP option causes an Omnidex or Custom index to be stored in a bitmap format rather than a B-tree format. The bitmap format is more efficient for indexes that have fewer than 32 distinct values. The B-tree format is more efficient for indexes that have greater than 32 distinct values. | ||
| + | |||
| + | The BITMAP option is frequently used on low-cardinality columns such as Yes/No flags, or columns like GENDER or MARITAL_STATUS. Using a Bitmap Index on these types of columns can significantly improve query performance. | ||
| + | |||
| + | Bitmap Indexes are not maintained when INSERT, DELETE and UPDATE statements are processed. Bitmap Indexes are rebuilt when an UPDATE INDEXES command is issued. | ||
| == STANDALONE == | == STANDALONE == | ||
| + | |||
| + | The STANDALONE option causes a non-keyworded Custom index to reside independently from the other indexes in the table. Standalone indexes can be built individually, avoiding the costs of updating all of the indexes for a given table. | ||
| == KEYWORDING == | == KEYWORDING == | ||
| + | |||
| + | The KEYWORDING option causes the data in the index to be parsed based on spaces and punctuation marks. This allows each word to be used as independent criteria. For example, the criteria "INFORMATION" would locate a row with the value of "DYNAMIC INFORMATION SYSTEMS CORPORATION". | ||
| + | |||
| + | The KEYWORDING option automatically implies the CASE_INSENSITIVE option, unless specifically overridden using the CASE_SENSITIVE option. This means that the criteria "INFORMATION" would locate a row with the value of "Dynamic Information Systems Corporation". | ||
| + | |||
| + | The KEYWORDING option does not track the location of each word in each column. The PROXIMITY option is required to track the location of each word. The KEYWORDING option simply records that the keyword was present for that row. The criteria "John Doe" would locate both a row containing "John Q. Doe" and a row containing "Doe, John Q.". | ||
| + | |||
| + | The KEYWORDING option has substantially less overhead than the PROXIMITY option and is recommended when performance is important. The KEYWORDING option is commonly used for smaller text fields such as name, address, descriptions, and brief comments. The PROXIMITY option is more commonly used on large text fields containing entire articles. | ||
| + | |||
| + | The following article on [[admin:indexing:keywording:home|Omnidex Keywording]] provides more details on the rules for parsing Omnidex keywords. | ||
| == PROXIMITY == | == PROXIMITY == | ||
| + | |||
| + | The PROXIMITY option causes the data in the index to be parsed based on spaces and punctuation marks, and also causes location information about each keyword to be recorded. This allows more sophisticated queries that compare the location of one keyword with another. The PROXIMITY option enables the use of the NEAR, BEFORE and AFTER operators, as well as the phrase searches. The PROXIMITY option also enables the use of the $SCORE and $CONTEXT functions. | ||
| + | |||
| + | The PROXIMITY option has substantially more overhead than the KEYWORDING option. The KEYWORDING option is commonly used for smaller text fields such as name, address, descriptions, and brief comments. The PROXIMITY option is more commonly used on large text fields containing entire articles. | ||
| + | |||
| + | The following article on [[admin:indexing:proximity:home|Omnidex Proximity Searches]] provides more details on performing proximity searches. | ||
| == < CASE_INSENSITIVE | CASE_SENSITIVE > == | == < CASE_INSENSITIVE | CASE_SENSITIVE > == | ||
| - | == EXCLUDED_WORDS == | + | The CASE_INSENSITIVE and CASE_SENSITIVE options cause the data in the index to be treated in either a case sensitive or a case insensitive manner. |
| == PHONETIC == | == PHONETIC == | ||
| - | == PREJOIN table == | + | The PHONETIC option causes index values to be indexed along with their phonetic equivalents. This option is required for performing phonetic searches using the $CONTAINS function in SELECT statements. |
| + | |||
| + | == PREJOIN table_name == | ||
| + | |||
| + | The PREJOIN option causes this index to be pre-joined to //table_name//. This option is used in conjunction with the RECORD_SPECIFIC and RECORD_COMPLEX options to determine how the index should be pre-joined. If neither the RECORD_SPECIFIC or RECORD_COMPLEX option is used, the RECORD_SPECIFIC option is used by default. | ||
| + | |||
| + | The following article on [[admin:indexing:advanced:prejoined|Omnidex Pre-joined Indexes]] describes the use of distinct constraints in more detail. | ||
| == < RECORD_SPECIFIC | RECORD_COMPLEX > == | == < RECORD_SPECIFIC | RECORD_COMPLEX > == | ||
| + | |||
| + | The RECORD_SPECIFIC and RECORD_COMPLEX options are used to determine how the index should be pre-joined to the table named in the PREJOIN option. | ||
| + | |||
| + | The following article on [[admin:indexing:advanced:prejoined|Omnidex Pre-joined Indexes]] describes the use of distinct constraints in more detail. | ||
| ==== index_group_specification ==== | ==== index_group_specification ==== | ||
| - | INDEX GROUP [ ( owner ) ] group ( index [, index ... ] ) | + | INDEX GROUP [ ( owner_table_name ) ] group_name ( index_name [, index_name ... ] ) |
| + | === INDEX GROUP ( owner_table_name ) group_name === | ||
| + | |||
| + | The INDEX GROUP clause is used to cause multiple indexes to be processed as a single indexes. When multiple indexes are grouped together, a search against any member of the group will automatically search the other members of the group. For example, if the columns ADDRESS1 and ADDRESS2 are combined into an Index Group, then a search for "MAIN STREET" will locate rows that have those two columns in either or both columns. | ||
| + | |||
| + | Index Groups can be created across multiple pre-joined tables; however, doing so requires using the CREATE INDEX GROUP statement. | ||
| + | |||
| + | |||
| + | ====== Additional Resources ====== | ||
| + | |||
| See also: | See also: | ||
| * [[dev:sql:statements:create_environment:home|CREATE ENVIRONMENT]] | * [[dev:sql:statements:create_environment:home|CREATE ENVIRONMENT]] | ||