update/insert, delete/insert efficiency WRT vacuum and MVCC

From: "Mark Woodward" <pgsql(at)mohawksoft(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: update/insert, delete/insert efficiency WRT vacuum and MVCC
Date: 2006-07-03 13:28:48
Message-ID: 18446.24.91.171.78.1151933328.squirrel@mail.mohawksoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Is there a difference in PostgreSQL performance between these two
different strategies:

if(!exec("update foo set bar='blahblah' where name = 'xx'"))
exec("insert into foo(name, bar) values('xx','blahblah'");
or
exec("delete from foo where name = 'xx'");
exec("insert into foo(name, bar) values('xx','blahblah'");

In my session handler code I can do either, but am curious if it makes any
difference. Yes, "name" is unique.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message paolo romano 2006-07-03 13:45:25 MultiXactID Wrap-Around
Previous Message paolo romano 2006-07-03 12:59:50 Re: [COMMITTERS] pgsql: Do a pass of code review for the ALTER TABLE