Pedro Alves <pmalves(at)think(dot)pt> writes:
> The vacuum analyze is run on daily basis, so that cannot be the point.
The next thing I'd try to improve the planner's guess is to increase the
statistics target for the ra_datacolh column (see ALTER TABLE SET
STATISTICS). It looks like the default of 10 is too small for that
column --- try 100 and see if the rowcount estimates get any closer.
regards, tom lane