- Does the analyse output below mean that it only scanned 51538 of 65463 rows in the table? Is school_id 36 just being missed in the sample? (This happens when the analyse is repeated )
Is there a transaction which had deleted all of school_id=36, and then was just left open indefinitely without either committing or rolling back?
That would explain it, and I don't know of anything else that could. The deleted but not committed tuples are still live, but don't get sampled.
Cheers,
Jeff