"Sergey E. Koposov" <math(at)sai(dot)msu(dot)ru> writes:
> I wonder what should be the best way to proceed for already migrated
> databases -- running analyze repeatedly may not be the best way for
> very large clusters with large tables...
You can just manually update pg_class.reltuples to a more reasonable
value.
regards, tom lane