Re: Performance Question - Mailing list pgsql-general

From Douglas McNaught
Subject Re: Performance Question
Date
Msg-id 8764j31oaa.fsf@suzuka.mcnaught.org
Whole thread Raw
In response to Performance Question  (Terry Lee Tucker <terry@esc1.com>)
List pgsql-general
Terry Lee Tucker <terry@esc1.com> writes:

> Hello List:
>
> I've been told that an update to a record is equivalent to a delete
> and insert operation. We have a utility written in Perl that brings
> into sync certain elements of 50 thousand records on 8 structurally
> identical databases. We threw together the script and decided to
> just delete the record and re-insert it with the data that was
> brought into sync. Now the question: Is it just as fast to do it
> this way, or is there some hidden advantage to performing an update?

UPDATE will probably be somewhat faster because it's only one SQL
statement to parse, plan and execute.

-Doug

pgsql-general by date:

Previous
From: Terry Lee Tucker
Date:
Subject: Performance Question
Next
From: Greg Stark
Date:
Subject: Re: Performance Question