|
There are three types of Metamorph index: normal, inverted and counter. A
normal Metamorph index is created with CREATE METAMORPH INDEX,
an inverted Metamorph index is created with CREATE
METAMORPH INVERTED INDEX, and a counter Metamorph index is created with
CREATE METAMORPH COUNTER INDEX.
A normal Metamorph index maintains knowledge of what rows words
occur in. It can greatly speed up LIKE queries because TEXIS
uses it to directly find the rows with the search terms. However,
a post-search is often needed to resolve phrases, delimiters, or rank
information.
An inverted Metamorph index maintains not only what rows a word
occurs in, but each word position in the text as well. With such an
index TEXIS can often avoid a post-search altogether, because the
index contains all the information needed for phrase resolution and
rank computation. This can speed up searches even more than a normal
Metamorph index, especially for ranking queries using LIKEP.
However, an inverted Metamorph index consumes more disk space,
typically 20-30% of the table size versus about 7% for a normal
Metamorph index. Index updating is also slower because of this.
Since an inverted Metamorph index can resolve more queries and is
faster at ranking, it is usually preferred over a normal Metamorph
index. In some situations, however, its extra capabilities are not
needed, and a normal Metamorph index will suffice. For example, if
queries are comprised of single words only (no phrases or special
pattern matchers), contain no "within" (w/) delimiters, and
no rank is needed (eg. a LIKE search), a normal Metamorph index
will work as well as an inverted one, and will save disk space.
A LIKER or LIKE3 search (below), which never do
a post-search, can also use a normal Metamorph index without loss
of performance.
The Metamorph counter index contains the same information that a
normal Metamorph index has, but also includes additional information
which improves the performance of LIKEIN queries. If you are
doing LIKEIN queries then you should create this type of index,
otherwise you should use either the normal or inverted forms of the
Metamorph index.
Copyright © Thunderstone Software Last updated: Thu Dec 22 14:51:46 EST 2011
|