Re: strange pg_stats behaviour?

Поиск
Список
Период
Сортировка
От Hubert depesz Lubaczewski
Тема Re: strange pg_stats behaviour?
Дата
Msg-id 20021130185107.GA5814@depesz.pl
обсуждение исходный текст
Ответ на Re: strange pg_stats behaviour?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: strange pg_stats behaviour?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Sat, Nov 30, 2002 at 11:05:01AM -0500, Tom Lane wrote:
> >> The planner doesn't know what value data_off will be compared to at
> >> runtime, so it has to fall back on a default selectivity estimate.
> > strange - is there no way we can "teach" him, that this is a constant. i
> > mean now() - '31 days'::interval will be exactly the same for all rows
> > of auction,
> It knows that.  What it doesn't know is how many rows of the table the
> query is going to select, and that is exactly the thing it needs to know
> to choose seqscan vs. indexscan.

than what purpose serves pg_stats? i belive it could be used to estimate
number of rows returned.
if i know that i will be comparing <field> with some <value>, and i'm
able to tell the value, i should be able to look in pg_stats to estimate
rowcount.
what am i missing?

depesz

--
hubert depesz lubaczewski                          http://www.depesz.pl/
------------------------------------------------------------------------
Mój Boże, spraw abym milczał, dopóki się nie upewnię,  że  naprawdę  mam
coś do powiedzenia.                                      (c) 1998 depesz


В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: vacuum full analyze problem
Следующее
От: Jochem van Dieten
Дата:
Сообщение: USAGE on schema allowed by default?