Secondary indexes for internal tables