Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> writes:
> You might need to crank up the aggresiveness of auto-analyze, at least
> on that one table if not for the whole db.
This might be the same type of scenario Josh was complaining about:
http://archives.postgresql.org/pgsql-hackers/2009-12/msg02308.php
Inequality conditions near the end of a moving data range may not
get estimated very accurately, unless you analyze very often.
I'm fooling with a patch for that right now.
regards, tom lane