This implies they can also be called by a program. Do not rely on this feature if you want to maintain portability to other Prolog implementations. 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. It is possible to redefine indexing on predicates that already have clauses attached to them.