Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Each time an OracleText full-text index is synchronized, the index becomes more fragmented. The higher the index fragmentation, the worse the search performance becomes. Index fragmentation is unavoidable in a live database where records are actively created, updated and deleted. The rate at which the index fragmentation increases depends on the index synchronization setting and the rate at which records are created, updated or deleted.  

Monitoring the index fragmentation

To obtain statistics about the full-text index execute a script similar to the following:

Code Block
languagesql
create table index_stats (ts timestamp, report clob);

declare 
  x clob := null;
begin
  ctx_report.index_stats('aq_fulltext_index', x);
  insert into index_stats (report) values (x);
  dbms_lob.freetemporary(x);
end;

select * from index_stats;

It is recommended to monitor the index fragmentation and determine the maximum index fragmentation where search performance is still acceptable. Based on this, an index maintainence maintenance plan can be implemented that will periodically optimize or rebuild the index. A decision must also be made on the tradeoff between index availability and index fragmentation:

  • the The less frequently an index is synchronized, the more it takes for changes to aggregates and documents to be available through full-text search.
  • the The more frequently an index is synchronized, the faster the index fragments and performance degrades.

 

Optimizing the full-text index

A fragmented index can be optimized in two ways:

  • by By using the CTX_DDL.OPTIMIZE_INDEX procedure.
  • by By rebuilding the index.

To optimize the index using a the CTX_DDL.OPTIMIZE_INDEX procedure, execute one of the following statements:

...

Please consult the reference documentation for CTX_DDL.OPTIMIZE_INDEX for detalis details on the various other options available for this stored procedure.

 

To optimize the index by rebuilding it, the following statement may be executed:

...

Please consult the reference documentation for OracleText ALTER INDEX REBUILD syntax for various other available options when rebuilding the index.

 

UI Expand
titleRelated articles

Content by Label
showLabelsfalse
max5
spacesBKB
showSpacefalse
sortmodified
showSpacefalse
reversetrue
typepage
cqllabel in ("bq97","search") and type = "page" and space = "BKB"
labelssearch bq97

UI Expand
titleReferences

 

 

...