Kristof's answer is very good, below some addition information.
In Efficy the data access to a table is done with so-called "table views" which are defined in SYS_TABLEVIEWS. This system table contains a number of fields to define which SQL select is performed on the table (with filters or join clauses).
When you open an edit or consult context for an entity, you open a so-called "entity view" which contains a collection of these table views. They are defined in SYS_ENTITYVIEWS.
The tableViewIndex refers to the order of the table views in this collection.
For example the entity view for editing a Contact is called ContEdit and contains 3 table views: Cont (tableViewIndex = 0), Cont_User (tableViewIndex = 1) and Cont_Comp (tableViewIndex = 2).
For most edit contexts there is the main or "master" entity (tableViewIndex 0) and a number of "detail" entities which are usually referred to by name. For example, for ContEdit we retrieve the users linked to the contact by GetDetailDataSet(ntUser) and the linked companies by GetDetailDataSet(ntComp).
Only when the "master" or "detail" concept doesn't apply, the "tableViewIndex" approach becomes useful. For example, when editing a Company-Company relation using the "Comp_CompEdit" entity view you'll find two table views for modifying the bidirectional relationship. There is no "detail" in this entity view, and you can only refer to the table views by means of their tableViewIndex.