pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Decibel! <decibel@decibel.org>
To: Merlin Moncure <mmoncure@gmail.com>
Cc: Mark Makarowsky <bedrockconstruction@yahoo.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Update table performance
Date: Thu, 9 Aug 2007 10:32:15 -0500
Message-ID: <20070809153215.GQ20424@nasby.net> (raw)
In-Reply-To: <b42b73150708090534n3c5dfba6qbabf6dc1b2e0011e@mail.gmail.com>
References: <20070807214227.GR25704@nasby.net>
	<670773.87500.qm@web32209.mail.mud.yahoo.com>
	<b42b73150708090534n3c5dfba6qbabf6dc1b2e0011e@mail.gmail.com>

On Thu, Aug 09, 2007 at 06:04:09PM +0530, Merlin Moncure wrote:
> That said, 'update' is the slowest operation for postgresql relative
> to other databases that are not MVCC.

Actually, it depends on how you do MVCC. In Oracle, DELETE is actually
the most expensive operation, because they have to not only remove the
row from the heap, they have to copy it to the undo log. And they need
to do something with indexes as well. Whereas we just update 4 bytes in
the heap and that's it.

An UPDATE in Oracle OTOH just needs to store whatever fields have
changed in the undo log. If you haven't messed with indexed fields, it
doesn't have to touch those either.
-- 
Decibel!, aka Jim Nasby                        decibel@decibel.org
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)

view thread (19+ messages)

Message-ID: <20070809153215.GQ20424@nasby.net>
Permalink:  ../20070809153215.GQ20424@nasby.net/
Also on:    postgresql.org/message-id/20070809153215.GQ20424@nasby.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: decibel@decibel.org, mmoncure@gmail.com, bedrockconstruction@yahoo.com
  Subject: Re: Update table performance
  In-Reply-To: <20070809153215.GQ20424@nasby.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox