Re: Idea for the statistics collector

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Martijn van Oosterhout <kleptog(at)svana(dot)org>, Postgresql General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Idea for the statistics collector
Date: 2002-06-21 13:39:15
Message-ID: 18986.1024666755@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-06-21 13:55:06 Re: pltcl bug in 7.2?
Previous Message Tycho Fruru 2002-06-21 13:01:02 Re: POSTGRESQL Optimizer

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-06-21 13:44:36 Re: Reduce heap tuple header size
Previous Message Bruce Momjian 2002-06-21 13:32:19 Re: What is wrong with hashed index usage?