Re: MVCC cons

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Jeff Davis" <pgsql(at)j-davis(dot)com>
Cc: "Merlin Moncure" <mmoncure(at)gmail(dot)com>, "Kenneth Downs" <ken(at)secdat(dot)com>, RPK <rpk(dot)general(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: MVCC cons
Date: 2007-08-15 19:06:22
Message-ID: dcc563d10708151206gd2e90aan9d181444c9d40dee@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 8/15/07, Jeff Davis <pgsql(at)j-davis(dot)com> wrote:
> On Wed, 2007-08-15 at 07:06 +0530, Merlin Moncure wrote:
> > You were half right. Inserts in PostgreSQL perform similar to other
> > databases (or at least, use similar mechanisms). It's the updates
> > that suffer, because this translates to delete + insert essentially.
> > Databases that use simple locking strategies can simply update the
> > record in place.
>
> I think in some databases that use locking, an INSERT can actually block
> a SELECT, and vice-versa. So wouldn't that mean PostgreSQL MVCC is
> better for INSERT performance?

For certain values of better, yes.

For inserting 10,000,000 rows, it's probably not as fast as some other
databases. But, you can insert those 10,000,000 rows while 100 users
run select statements and none of them will block. So, even if it
takes twice as long as a table locking db, that's still probably ok,
because the readers can keep right on reading.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gregory Stark 2007-08-15 19:11:16 Re: Interpreting statistics collector output
Previous Message Martijn van Oosterhout 2007-08-15 18:55:14 Re: Best practice for: ERROR: invalid byte sequence for encoding "UTF8"