change index partitioning to faster and more memory consuming algorithm