From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Peter Geoghegan <pg(at)bowt(dot)ie> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Anastasia Lubennikova <a(dot)lubennikova(at)postgrespro(dot)ru>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
Subject: | Re: Enabling B-Tree deduplication by default |
Date: | 2020-01-29 21:02:01 |
Message-ID: | CA+TgmobudKeiE5_=z4VRHS8DhLhDTn2Mg=kCr33pi4R5-xKNxQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jan 29, 2020 at 2:50 PM Peter Geoghegan <pg(at)bowt(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2020-01-29 21:02:08 | Re: making the backend's json parser work in frontend code |
Previous Message | Julien Rouhaud | 2020-01-29 20:58:12 | Re: Collation versioning |