Oracle Text索引概述

来源:互联网 发布:清朗的网络空间 编辑:程序博客网 时间:2024/04/30 20:45
Classification: Oracle Text domain index and composite domain index of type CONTEXTCTXCAT, CTXRULE, orCTXXPATH.  
        A composite domain index (CDI) is an Oracle Text index that not only indexes and processes a specified text column, but also indexes and processes FILTER BY and ORDER BY structured columns, which are specified during index creation.

CONTEXT
A CONTEXT index is useful when your source text consists of many large, coherent documents.
This index requires manual synchronization after DML. 
CREATE INDEX [schema.]index ON [schema.]table(txt_column)  INDEXTYPE IS ctxsys.context [ONLINE]  [FILTER BY filter_column[, filter_column]...]  [ORDER BY oby_column[desc|asc][, oby_column[desc|asc]]...]  [LOCAL [(PARTITION [partition] [PARAMETERS('paramstring')]
[, PARTITION [partition] [PARAMETERS('paramstring')]])]
[PARAMETERS(paramstring)] [PARALLEL n] [UNUSABLE]];
paramstring = 
'[DATASTORE datastore_pref]  [FILTER filter_pref]  [CHARSET COLUMN charset_column_name]   [FORMAT COLUMN format_column_name] [LEXER lexer_pref] [LANGUAGE COLUMN language_column_name]  [WORDLIST wordlist_pref]  [STORAGE storage_pref]  [STOPLIST stoplist]  [SECTION GROUP section_group] [MEMORY memsize] [POPULATE | NOPOPULATE] [SYNC (MANUAL | EVERY "interval-string" | ON COMMIT)] [TRANSACTIONAL]'
如:
CREATE INDEX tdrmauto02x ON tdrmauto02(text)   INDEXTYPE IS CTXSYS.CONTEXT local   (PARTITION tdrm02x_i1 PARAMETERS('   MEMORY 20m SYNC(ON COMMIT)'),   PARTITION tdrm02x_i2,   PARTITION tdrm02x_i3)  PARAMETERS('   SYNC (EVERY "NEXT_DAY(TRUNC(SYSDATE), ''MONDAY'') + 15/24")  ');
手工维护:execute CTL_DDL.SYNC_INDEX('REVIEW_CONTEXT_INDEX');
自动维护:设定提交时或在指定时间间隔内自动维护
CTXCAT 
This index is transactional, automatically updating itself with DML to the base table
CTXXPATH
The CTXPATH index is used to speed up   existsNode()  queries on an XMLType column
原创粉丝点击