Re: Performance UPDATE/INSERT

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Performance UPDATE/INSERT
Date: 2006-04-11 10:27:57
Message-ID: 20060411102756.GF5520@webserv.wug-glas.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

am 11.04.2006, um 12:15:41 +0200 mailte Alban Hertroys folgendes:
> MG wrote:
> >I have to improve the performance of the UPDATES and I was wondering why
> >the UPDATEs need twice as long as the INSERTs.
>
> IIRC, an UPDATE is a DELETE/INSERT combo. That's because the original
> record still needs to be visible to other existing transactions (because of
> MVCC). You can't change its data but need to create a new record instead
> and mark the original as obsolete.

Correctly, and thats why we need VACUUM to clean the space on the disk.

HTH, Andreas
--
Andreas Kretschmer (Kontakt: siehe Header)
Heynitz: 035242/47215, D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
=== Schollglas Unternehmensgruppe ===

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dave Page 2006-04-11 11:02:33 Re: Debian package for freeradius_postgresql module
Previous Message Alban Hertroys 2006-04-11 10:19:57 Re: trigger firing order