optimise relationship_get_details