Re: How jsonb updates affect GIN indexes

From: Francisco Olarte <folarte(at)peoplecall(dot)com>
To: Eric Mortensen <eric(at)appstax(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: How jsonb updates affect GIN indexes
Date: 2016-02-27 11:00:03
Message-ID: CA+bJJbyvjR_3KV1d9BMmTX9suxZjWBKedO5pB=e4DT+XTPRCKA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Eric:

On Sat, Feb 27, 2016 at 11:46 AM, Eric Mortensen <eric(at)appstax(dot)com> wrote:
> When a jsonb column is updated, as far as I understand the entire column is
> updated, even though perhaps only one of the keys has a modified value.

Also, bear in mind when a column is updated the tuple is too, and
MVCC treats it similarly to a delete+insert, so it may move around (
as the old version may be needed by some transaction, and not enough
space may be free on the original location ). and every index
reference ( GIN or whatever, to any column ) needs to be updated. I do
not know the details, I just know it's a complex decision, someone
with more knowledge of the internals may give you a more acurate
descriptin if needed.

Francisco Olarte.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Francisco Olarte 2016-02-27 12:28:31 Re: How jsonb updates affect GIN indexes
Previous Message Eric Mortensen 2016-02-27 10:46:33 How jsonb updates affect GIN indexes