REFRESH TEXT INDEX Statement

Refreshes a text index.

Syntax

REFRESH TEXT INDEX text-index-name ON [ owner.]table-name
   [ WITH {
      ISOLATION LEVEL isolation-level 
      | EXCLUSIVE MODE 
      | SHARE MODE } ]
   [ FORCE { BUILD | INCREMENTAL } ]

Parameters

Examples

Usage

This statement can only be used on text indexes defined as MANUAL REFRESH or AUTO REFRESH.

When using the FORCE clause, you can examine the results of the sa_text_index_stats system procedure to decide whether a complete rebuild (FORCE BUILD), or incremental update (FORCE INCREMENTAL) is most appropriate.

You cannot execute the REFRESH TEXT INDEX statement on a text index that is defined as IMMEDIATE REFRESH.

For MANUAL REFRESH text indexes, use the sa_text_index_stats system procedure to determine whether the text index should be refreshed. Divide pending_length by doc_length, and use the percentage as a guide for deciding whether a refresh is required. To determine the type of rebuild required, use the same process for deleted_length and doc_count.

This statement cannot be executed when there are cursors opened with the WITH HOLD clause that use either statement or transaction snapshots.

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

Requires one of: