Oracle Text Reference Release 9.0.1 Part Number A90121-01 |
|
CTX_DDL Package, 20 of 28
Use this procedure to optimize the index. You optimize your index after you synchronize it. Optimizing the index removes old data and minimizes index fragmentation. Optimizing the index can improve query response time.
You can optimize in fast, full, or token mode. In token mode, you specify a specific token to be optimized. You can use token mode to optimize index tokens that are frequently searched, without spending time on optimizing tokens that are rarely referenced. An optimized token can improve query response time for that token.
Using this procedure to optimize your index is recommended over using the ALTER INDEX statement.
CTX_DDL.OPTIMIZE_INDEX(idx_name IN VARCHAR2, optlevel IN VARCHAR2, maxtime IN NUMBER DEFAULT NULL, token IN VARCHAR2 DEFAULT NULL, part_name IN VARCHAR2 DEFAULT NULL););
Specify the name of the index.
Specify optimization level as a string. You can specify one of the following methods for optimization:
Specify maximum optimization time, in minutes, for FULL optimize.
When you specify the symbol CTX_DDL.MAXTIME_UNLIMITED (or pass in NULL), the entire index is optimized. This is the default.
Specify the token to be optimized.
Specify the name of the index partition to optimize.
The following two examples optimize the index for fast optimization.
begin ctx_ddl.optimize_index('myidx','FAST'); end; begin ctx_ddl.optimize_index('myidx',CTX_DDL.OPTLEVEL_FAST); end;
The following example optimizes the index token Oracle:
begin ctx_ddl.optimize_index('myidx','token', TOKEN=>'Oracle'); end;
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|