Re: BUG #1552: massive performance hit between 7.4 and 8.0.1 - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #1552: massive performance hit between 7.4 and 8.0.1
Date
Msg-id 4841.1111692142@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #1552: massive performance hit between 7.4 and 8.0.1  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #1517: SQL interval syntax is accepted by the parser,
Next
From: Tom Lane
Date:
Subject: Re: BUG #1532: typecast problem between arrays of an int8 derived datatype and varchar[]