Re: MVCC cons - Mailing list pgsql-general

From Scott Marlowe
Subject Re: MVCC cons
Date
Msg-id dcc563d10708151206gd2e90aan9d181444c9d40dee@mail.gmail.com
Whole thread Raw
In response to Re: MVCC cons  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-general
On 8/15/07, Jeff Davis <pgsql@j-davis.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.

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Best practice for: ERROR: invalid byte sequence for encoding "UTF8"
Next
From: Gregory Stark
Date:
Subject: Re: Interpreting statistics collector output