>
> Possibly the table's never been ANALYZEd ... do you have autovacuum
> enabled? If it has been analyzed reasonably recently, then it might be
> necessary to crank up the statistics target to get a better estimate.
> It's difficult to give detailed advice when you haven't mentioned what
> PG version you're running.
>
I do have autovacuum enabled and I am running 8.4
autovacuum = on
vacuum_cost_limit = 150
log_autovacuum_min_duration = 0
autovacuum_max_workers = 4
autovacuum_naptime = 5min
autovacuum_vacuum_cost_delay = 30ms