1. A method, comprising: storing data that is encoded with an Error Correction Code (ECC) in a group of memory cells; reading the memory cells in the group using multiple sets of read thresholds; dividing the memory cells in the group into two or more subsets; computing a plurality of partial syndromes of the ECC, wherein each partial syndrome is computed over readout results that were read using a respective set of the read thresholds from a respective subset of the memory cells; determining a number of occurrences for each combination of a plurality of bit values, wherein the plurality of bit values includes a bit value from a given bit position from each partial syndrome of the plurality of partial syndromes; calculating an optimal set of read thresholds dependent upon on the number of occurrences for each combination of the plurality of bit values; and performing data recovery using the optimal read thresholds.