Re: Performance Question - Mailing list pgsql-general

From Alan Hodgson
Subject Re: Performance Question
Date
Msg-id 200606141345.44624@hal.medialogik.com
Whole thread Raw
In response to Re: Performance Question  (Greg Stark <gsstark@mit.edu>)
List pgsql-general
On Wednesday 14 June 2006 13:24, Greg Stark <gsstark@mit.edu> wrote:
> One way it would be unequal is if you can do your DELETE as a single
> query and the insert operation as using a single large COPY FROM.

This is definitely the fastest way to update tens of thousands of rows if
you know they all need to be replaced.  It saves on index lookups and also
network latency to the feeding app.

I have also had measurable success COPYing data into a temp table and then
using joins against that to delete,update,or insert only the rows that
actually need to be processed in the real table (saving unnecessary index
updates).

--
In a truly free society, "Alcohol, Tobacco and Firearms" would be a
convenience store chain.


pgsql-general by date:

Previous
From: Greg Stark
Date:
Subject: Re: Performance Question
Next
From: SCassidy@overlandstorage.com
Date:
Subject: Re: table has many to many relationship with itself - how