I wrote:
> ...  Maybe we could
> put in a hack that detects whether a table has yet been vacuumed, and
> sets 10/1000 as the minimum stats --- not fixed values, but minimum
> values that can be overridden when the table is actually larger --- 
> until it has been vacuumed.

For lack of any better suggestions, I've done this in HEAD and 8.0
branches.  It proved simplest to just limit the page estimate to be
at least 10 pages when relpages == 0.  The tuple estimate will be
derived from that using pre-existing code that estimates the average
tuple size.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Reply via email to