"Sergey E. Koposov" <math@sai.msu.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