Re: No heap lookups on index

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: David Scott <davids(at)apptechsys(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: No heap lookups on index
Date: 2006-01-18 22:37:03
Message-ID: 20060118223703.GV17896@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Wed, Jan 18, 2006 at 12:14:12PM -0800, David Scott wrote:
> Do commercial databases implement MVCC in a way that allows an
> efficient implementation of index lookups that can avoid heap lookups?

Oracle does, but you pay in other ways. Instead of keeping dead tuples
in the main heap, they shuffle them off to an 'undo log'. This has some
downsides:

Rollbacks take *forever*, though this usually isn't much of an issue
unless you need to abort a really big transaction.

Every update/delete means two seperate writes to disk, one for the base
table and one for the undo log (well, there's also the redo log,
equivalent to our WAL). Though writes to undo can (and presumably are)
grouped together, so they should normally be a lot more efficient than
the updates to the base table unless you're updating data in table
order.

Of course there's downsides to our MVCC as well; the cost of index scans
is just one.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jim C. Nasby 2006-01-18 22:38:53 Re: No heap lookups on index
Previous Message Devrim GUNDUZ 2006-01-18 22:25:22 Re: 32/64 architectures for backup/WALs

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim C. Nasby 2006-01-18 22:38:53 Re: No heap lookups on index
Previous Message Tom Lane 2006-01-18 22:27:29 Re: Unique constraints for non-btree indexes