MERGE: performance advices - Mailing list pgsql-general

From Ivan Sergio Borgonovo
Subject MERGE: performance advices
Date
Msg-id 20080902131934.473dc97f@dawn.webthatworks.it
Whole thread Raw
Responses Re: MERGE: performance advices  (Gregory Stark <stark@enterprisedb.com>)
Re: MERGE: performance advices  ("Richard Broersma" <richard.broersma@gmail.com>)
List pgsql-general
I need to merge 2 tables:

update d set c1=s.c1, c2=s.c2... from s where d.pk=s.pk;
insert into d (pk, c1, c2, ...) select pk, c1, c2, c3 from s
  where s.pk not in (select pk from d);

Any strategy to make it faster? Including modifying postgres.conf
temporary?

Considering I've no concurrency problems. The tables I'm dealing
with are "read only" for everything else other than the merge
process.

thanks

--
Ivan Sergio Borgonovo
http://www.webthatworks.it


pgsql-general by date:

Previous
From: tfinneid@student.matnat.uio.no
Date:
Subject: Re: plpgsql returning resultset
Next
From: Raymond O'Donnell
Date:
Subject: Re: plpgsql returning resultset