Re: Performance Question

From: Alan Hodgson <ahodgson(at)simkin(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Performance Question
Date: 2006-06-14 20:45:44
Message-ID: 200606141345.44624@hal.medialogik.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wednesday 14 June 2006 13:24, Greg Stark <gsstark(at)mit(dot)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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message SCassidy 2006-06-14 20:51:50 Re: table has many to many relationship with itself - how
Previous Message Greg Stark 2006-06-14 20:24:27 Re: Performance Question