Re: Idea for the statistics collector - Mailing list pgsql-general

From Tom Lane
Subject Re: Idea for the statistics collector
Date
Msg-id 18986.1024666755@sss.pgh.pa.us
Whole thread Raw
In response to Re: Idea for the statistics collector  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-general
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Martijn van Oosterhout wrote:
>> Firstly, I was only thinking of going for the basic nodes (Index Scan, Seq
>> Scan, Distinct). Other types have far more variables. Secondly, even if you
>> only count, it's useful. For example, if it tells you that the planner is
>> off by a factor of 10 more than 75% of the time, that's useful information
>> independant of what the actual variables are.

> Yes, only updating the stats if the estimate was off by a factor of 10
> or so should cut down on the overhead.

And reduce the usefulness even more ;-).  As a pure stats-gathering
exercise it might be worth doing, but not if you only log the failure
cases.  How will you know how well you are doing if you take a
biased-by-design sample?

            regards, tom lane

pgsql-general by date:

Previous
From: Tycho Fruru
Date:
Subject: Re: POSTGRESQL Optimizer
Next
From: Tom Lane
Date:
Subject: Re: pltcl bug in 7.2?