"Robert Haas" <robertmhaas@gmail.com> writes:
> This seems like the wrong solution. There is a general problem that
> bulk data loads on an empty table tend to result in horrible query
> plans,
Please provide some specifics. It's been a very long time since the
planner was completely unaware of the size of such a table. Lack of
stats is certainly a handicap, but I'm not convinced it should result
in horrible plans. Maybe a more appropriate answer to this type of
issue is to tweak some of the default selectivity numbers.
> And maybe also do the same thing if the table has grown significantly
> (not sure what the threshold should be) since the last ANALYZE.
Autovacuum already does this type of thing.
regards, tom lane