GeneXus automatically creates indices that efficiently access Tables and permits a more efficient Referential Integrity control. There are three types of indices: Primary, Foreign, and User.
The primary index defines the primary key and it is used to control record uniqueness. It also controls, when records are created in a subordinated table, that the corresponding record exists in the superordinated table. GeneXus automatically defines all primary indices from Transactions
Foreign Indices are used to make more efficient inter-table integrity controls. They are also automatically defined. When a record is removed from the subordinated table, there should be no corresponding record in the subordinated table.
User Indices are mainly defined to query data in an efficient way.
In a relational database, indices are used for performance reasons, but it is always possible to access table data using any of its attributes. This is always true because it is possible to order a table based on any of its attributes whenever necessary. For example, by either creating a temporary index or by using the resources provided by the database you use.