update/insert, delete/insert efficiency WRT vacuum and MVCC - Mailing list pgsql-hackers

From Mark Woodward
Subject update/insert, delete/insert efficiency WRT vacuum and MVCC
Date
Msg-id 18446.24.91.171.78.1151933328.squirrel@mail.mohawksoft.com
Whole thread Raw
Responses Re: update/insert, delete/insert efficiency WRT vacuum and  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
List 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.


pgsql-hackers by date:

Previous
From: paolo romano
Date:
Subject: Re: [COMMITTERS] pgsql: Do a pass of code review for the ALTER TABLE
Next
From: paolo romano
Date:
Subject: MultiXactID Wrap-Around