generally the field that is used in the relationship has to have its main index set to the proper index

so if for ex ORDERHEADER.CUSTOMER_NUMBER relates to CUSTOMER.NUMBER, CUSTOMER.NUMERs main index needs to be an index that is unique for CUSTOMER.NUMBER. this is needed of course to find the customer for a given order

ORDERHEADER.CUSTOMER_NUMBERs main index should point to an index that starts with ORDERHEADER.CUSTOMER_NUMBER. this is needed to find orders for a given customer without having to do a table scan.