improve approxdoccount performance