Re: benchmarking the query planner

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: benchmarking the query planner
Дата
Msg-id 14209.1229041816@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: benchmarking the query planner  ("Nathan Boley" <npboley@gmail.com>)
Ответы Re: benchmarking the query planner  ("Nathan Boley" <npboley@gmail.com>)
Список pgsql-hackers
"Nathan Boley" <npboley@gmail.com> writes:
> Well, ISTM there is a profound difference. For scalarineqsel we care
> about the total number of values in a bucket. For eqsel  we care about
> the total number of *distinct* values in each bucket

Really?

> IMHO, the whole idea of increasing mcv's seems a mistake. Why not use
> the limited storage in pg_statistic to try and estimate the
> selectivity for ranges of values rather than a single value?

MCVs are useful for questions that are not related to ranges of values
--- an example of something highly useful we do with them is to try to
estimate the fraction of a column that satisfies a LIKE or regex
pattern.

In fact, as I was just pointing out to Bruce, we can compute them and
do useful things with them for datatypes that don't have a defined sort
order and so the whole concept of "range" is meaningless.

Now, if your point is that it'd be more flexible to not tie the MCV list
length to the histogram length, you're right.  I'm not sure we can
expect the average DBA to set two separate knobs very effectively,
though.  We do already have some smarts in there to try to set the MCV
list length intelligently instead of slavishly following the stats
target --- perhaps it wouldn't be a bad idea to develop similar
heuristics for choosing an actual histogram length.
        regards, tom lane


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

Предыдущее
От: "Nathan Boley"
Дата:
Сообщение: Re: benchmarking the query planner
Следующее
От: KaiGai Kohei
Дата:
Сообщение: Re: Updates of SE-PostgreSQL 8.4devel patches (r1268)