Re: update/insert,

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: "Mark Woodward" <pgsql(at)mohawksoft(dot)com>, "Martijn van Oosterhout" <kleptog(at)svana(dot)org>, "Zdenek Kotala" <zdenek(dot)kotala(at)sun(dot)com>
Subject: Re: update/insert,
Date: 2006-07-05 15:52:12
Message-ID: 200607050852.12454.jd@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> > Which is faster will probably depends on what is more common in your DB:
> > row already exists or not. If you know that 99% of the time the row
> > will exist, the update will probably be faster because you'll only
> > execute one query 99% of the time.
>
> OK, but the point of the question is that constantly updating a single row
> steadily degrades performance, would delete/insery also do the same?

Yes. Delete still creates a dead row. There are programatic ways around this
but keeping a delete table that can be truncated at intervals.

Joshua D. Drake

>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2006-07-05 16:00:05 Scan Keys
Previous Message mark 2006-07-05 15:25:18 Re: update/insert,