add uniqIndex into hist tables