Re: Idea for the statistics collector

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: Postgresql General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Idea for the statistics collector
Date: 2002-06-21 04:47:18
Message-ID: 16739.1024634838@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Martijn van Oosterhout <kleptog(at)svana(dot)org> writes:
> Since it's currently all for collecting statistics on tables, why can't it
> collect another type of statistic, like:
> - How often the estimator gets it wrong?
> [snip]
> Does anyone see any problems with this?

(1) forced overhead on *every* query.
(2) contention to update the same rows of pg_statistic (or wherever you
plan to store this info).
(3) okay, so the estimate was wrong; exactly which of the many
parameters that went into the estimate do you plan to twiddle?
What if it's not the parameter values that are at fault, but the
cost-model equations themselves?

Closed-loop feedback is a great thing when you understand the dynamics
of the system you intend to apply feedback control to. When you don't,
it's a great way to shoot yourself in the foot. Unfortunately I don't
think the PG optimizer falls in the first category at present.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Winter, Wolfgang 2002-06-21 06:46:32 timezone incompatibility
Previous Message Tom Lane 2002-06-21 04:34:52 Re: crash problem

Browse pgsql-hackers by date

  From Date Subject
Next Message Oleg Bartunov 2002-06-21 05:45:46 Re: What is wrong with hashed index usage?
Previous Message Dann Corbit 2002-06-21 04:02:58 Re: [GENERAL] Idea for the statistics collector