Re: Does frequent update of a row affects performance

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Rakesh Kumar <rakeshkumar464a3(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Does frequent update of a row affects performance
Date: 2016-04-26 14:22:58
Message-ID: 2c60e4c2-02c9-f604-a45a-9c7882cbdc07@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 04/26/2016 05:55 AM, Rakesh Kumar wrote:
> Pardon me if this has been discussed before.
>
> I believe that PG back-end does not version index rows the way it does
> the data rows. Assume that the app updates a row frequently (several
> times in a second). For each update, PG will create a new version.
> However I believe the primary key index pointing to that row will point
> to only the first row and the back end has to work its way traversing
> the list until it finds the appropriate row matching the xmin/xmax.
> Does frequent vaccum take care of this by removing the dead rows and
> hence reducing the commute.

Might want to take a look at:

http://www.postgresql.org/docs/9.5/interactive/indexam.html

>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2016-04-26 14:27:41 Re: Problems running the WorkerSpi sample
Previous Message Jayadevan M 2016-04-26 14:16:19 Re: truncate table getting blocked