"Tyrrill, Ed" <tyrrill_ed(at)emc(dot)com> writes:
> I did a vacuum analyze after inserting all the data. Is there possibly
> a bug in analyze in 8.1.5-6? I know it says rows=3D436915, but the last
> time the backup_location table has had that little data in it was a
> couple months ago, and analyze has been run many times since then.
> Currently it has over 160 million rows.
Possibly you need a larger statistics target for that table.
regards, tom lane