Re: questions about PG update performance

From: Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Любен Каравелов <karavelov(at)mail(dot)bg>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: questions about PG update performance
Date: 2015-10-26 11:01:29
Message-ID: CAFjFpRec8q5V6RCQzZY_c5w+B-9wODEd1o1-LF_JT1qRAkwiGw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Oct 26, 2015 at 4:09 PM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
wrote:

> On Mon, Oct 26, 2015 at 12:07 PM, Ashutosh Bapat <
> ashutosh(dot)bapat(at)enterprisedb(dot)com> wrote:
>
>>
>>
>> On Mon, Oct 26, 2015 at 10:19 AM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
>> wrote:
>>>
>>>
>>> I think Oracle just copies the changed part of old row to rollback
>>> segment.
>>> Also in Redo logs, it just writes the changed column value (both old and
>>> new). So for the case we are discussing in this thread (one changed
>>> column out of 200 columns), Oracle will just write the old value of that
>>> column in Redo and then in rollback segment, and write the new value
>>> in Redo and then do the in-place update in heap row.
>>>
>>>
>> In that case, readers would pay the penalty for constructing the row.
>>
>
> Readers that have snapshot older than update-transaction needs to
> pay such cost, otherwise all newer transactions can directly read from
> page. Also not all old-transaction readers have to pay any such cost.
>
>
Can you please explain your last sentence?

>
> Not only that, such a design has an advantage that the bloat due to
> older data won't be there.
>

--
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Artur Zakirov 2015-10-26 11:37:23 Re: [PROPOSAL] Improvements of Hunspell dictionaries support
Previous Message Amit Kapila 2015-10-26 10:39:37 Re: questions about PG update performance