Re: Locking B-tree leafs immediately in exclusive mode - Mailing list pgsql-hackers

From Alexander Korotkov
Subject Re: Locking B-tree leafs immediately in exclusive mode
Date
Msg-id CAPpHfdufVgOfpG+ZoujrrFQQYMfuJseAC9Ypi7Sp3SjnHvQ+XA@mail.gmail.com
Whole thread Raw
In response to Re: Locking B-tree leafs immediately in exclusive mode  (Claudio Freire <klaussfreire@gmail.com>)
List pgsql-hackers
On Thu, Jun 14, 2018 at 4:56 PM Claudio Freire <klaussfreire@gmail.com> wrote:
> Not at all. Insertion cost in unique indexes with lots of duplicates
> (happens, dead duplicates) grows quadratically on the number of
> duplicates, and that's improved by making the index unique and sorted.

Sorry, I've messed up the terms.  I did actually compare current
non-unique indexes with non-unique indexes keeping duplicate entries
ordered by TID (which makes them somewhat unique).  I didn't really
considered indexes, which forces unique constraints.  For them
insertion cost grows quadratically (as you mentioned) independently on
whether we're keeping duplicates ordered by TID or not.

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company


pgsql-hackers by date:

Previous
From: Claudio Freire
Date:
Subject: Re: Locking B-tree leafs immediately in exclusive mode
Next
From: Alvaro Herrera
Date:
Subject: Re: Needless additional partition check in INSERT?