recorded index pruning algo