Re: [HACKERS] Enhanced containment selectivity function

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Enhanced containment selectivity function
Дата
Msg-id 23644.1147440825@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Enhanced containment selectivity function  (Matteo Beccati <php@beccati.com>)
Ответы Re: [HACKERS] Enhanced containment selectivity function
Список pgsql-patches
Matteo Beccati <php@beccati.com> writes:
> It was a big surprise having no improvements at all in the query I used
> for all my previous tests, until I found out that the test against
> histogram values was removed by Tom. I strongly think it should be
> reintroduced: ltree columns are likely to have a unique constraint and
> the current ltreeparentsel function will behave just like contsel in
> these cases.

The histogram values seem completely meaningless in this context ---
for containment purposes, they are just ten or so randomly chosen
values.  I don't believe that the estimator works better with them.
Certainly, whether the column is unique or not is totally irrelevant
to whether they are representative.

What would seem saner to me is to add a datatype-specific analyze
function that collects some statistics that are actually relevant
to containment, and then make use of those in the estimator.

            regards, tom lane

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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: [PATCH] Improve EXPLAIN ANALYZE overhead by sampling
Следующее
От: Matteo Beccati
Дата:
Сообщение: Re: [HACKERS] Enhanced containment selectivity function