pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Pavan Deolasee <pavan.deolasee@gmail.com>
To: jay <jackem.mojx@alibaba-inc.com>
Cc: Heikki Linnakangas <heikki@enterprisedb.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: [PERFORM] 答复: [PERFORM] Postgresql update op is very very slow
Date: Thu, 26 Jun 2008 16:01:42 +0530
Message-ID: <2e78013d0806260331u3a60bff4yda1fee42688eeea5@mail.gmail.com> (raw)
In-Reply-To: <005101c8d773$ff81b2c0$0644000a@hz.ali.com>
References: <473587.97248.qm@web32701.mail.mud.yahoo.com>
	<op.uc83c7m2cigqcu@apollo13.peufeu.com>
	<004b01c8d671$3dec1630$0544000a@hz.ali.com>
	<486219B6.7050003@enterprisedb.com>
	<005101c8d773$ff81b2c0$0644000a@hz.ali.com>

2008/6/26 jay <jackem.mojx@alibaba-inc.com>:

>        If we can do commit very 1000 row per round, it may resolve the
> problem.
> But  PG not support transaction within function yet?
>

Yeah, transaction control is not supported inside functions. There are
some hacks using dblink to do transactions inside functions. You may
want to check that out.

I had suggested another hack in the past for very simplistic updates,
when you are sure that the tuple length does not change between
updates and you are ready to handle half updated table if there is a
crash or failure in between. May be for your case, where you are
updating a single column of the entire table and setting it to some
default value for all the rows, it may work fine. But please be aware
of data consistency issues before you try that. And it must be once in
a lifetime kind of hack.

http://postgresql-in.blogspot.com/2008/04/postgresql-in-place-update.html

Thanks,
Pavan


-- 
Pavan Deolasee
EnterpriseDB http://www.enterprisedb.com



view thread (2+ messages)  latest in thread

Message-ID: <2e78013d0806260331u3a60bff4yda1fee42688eeea5@mail.gmail.com>
Permalink:  ../2e78013d0806260331u3a60bff4yda1fee42688eeea5@mail.gmail.com/
Also on:    postgresql.org/message-id/2e78013d0806260331u3a60bff4yda1fee42688eeea5@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: pavan.deolasee@gmail.com, jackem.mojx@alibaba-inc.com, heikki@enterprisedb.com
  Subject: Re: [PERFORM] 答复: [PERFORM] Postgresql update op is very very slow
  In-Reply-To: <2e78013d0806260331u3a60bff4yda1fee42688eeea5@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox