Re: [HACKERS] update/insert, delete/insert efficiency WRT vacuum and

2006-07-04 Thread Zeugswetter Andreas DCP SD
> > >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 In pg, this strategy is generally more efficient,

Re: [HACKERS] update/insert, delete/insert efficiency WRT vacuum and

2006-07-04 Thread Martijn van Oosterhout
On Tue, Jul 04, 2006 at 11:59:27AM +0200, Zdenek Kotala wrote: > Mark, > I don't know how it will exactly works in postgres but my expectations are: > > Mark Woodward wrote: > >Is there a difference in PostgreSQL performance between these two > >different strategies: > > > > > >if(!exec("update fo

Re: [HACKERS] update/insert, delete/insert efficiency WRT vacuum and

2006-07-04 Thread Zdenek Kotala
Mark, I don't know how it will exactly works in postgres but my expectations are: Mark Woodward wrote: 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) value

[HACKERS] update/insert, delete/insert efficiency WRT vacuum and MVCC

2006-07-03 Thread Mark Woodward
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