Do not rely on this feature if you want to maintain portability to other Prolog implementations. Index the clauses of the predicate with the same name and arity as Head on the specified arguments. Indexing has no implications for the semantics of a predicate, only on its performance. If indexing is enabled on a predicate a special purpose algorithm is used to select candidate clauses based on the actual arguments of the goal. This algorithm checks whether indexed arguments might unify in the clause head.
Indexing is very useful for predicates with many clauses representing facts.
Due to the representation technique used at most 4 arguments can be indexed. All indexed arguments should be in the first 32 arguments of the predicate. If more than 4 arguments are specified for indexing only the first 4 will be accepted. Arguments above 32 are ignored for indexing. By default all predicates with are indexed on their first argument.