Re: Enabling B-Tree deduplication by default

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Enabling B-Tree deduplication by default
Дата
Msg-id CA+TgmobudKeiE5_=z4VRHS8DhLhDTn2Mg=kCr33pi4R5-xKNxQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Enabling B-Tree deduplication by default  (Peter Geoghegan <pg@bowt.ie>)
Список pgsql-hackers
On Wed, Jan 29, 2020 at 2:50 PM Peter Geoghegan <pg@bowt.ie> wrote:
> It's tempting to try to reason about the state of an index over time
> like this, but I don't think that it's ever going to work well.
> Imagine a unique index where 50% of all values are NULLs, on an
> append-only table. Actually, let's say it's a non-unique index with
> unique integers, and NULL values for the remaining 50% of rows -- that
> way we don't get the benefit of the incoming-item-is-duplicate
> heuristic.

I mean, if you guess wrong and deduplicate less frequently, you are no
worse off than today.

But it depends, too, on the magnitude.  If a gain is both large and
probable and a loss is both unlikely and improbable, then accepting a
bit of slowdown when it happens may be the right call.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Julien Rouhaud
Дата:
Сообщение: Re: Collation versioning
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: making the backend's json parser work in frontend code