Re: Performance Improvement for Unique Indexes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gokulakannan Somasundaram <gokul007(at)gmail(dot)com>
Cc: pgsql-hackers list <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Performance Improvement for Unique Indexes
Date: 2010-03-24 14:39:42
Message-ID: 21102.1269441582@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Gokulakannan Somasundaram <gokul007(at)gmail(dot)com> writes:
> While i was studying the unique index checks very closely, i realized
> that what we need is to find out whether the tuple is deleted / not. So say
> a tuple is deleted by a transaction, but it is not dead( because of some
> long running transaction ), still we can mark a hint bit as deleted and it
> will help the subsequent transactions doing the unique checks. As a matter
> of fact, it will help the deferred_unique cases, since it will anyway check
> the tuples twice, if there is a duplicate.

It seems fairly unlikely to me that this would be useful enough to
justify using up a precious hint bit. The applicability of the hint
is very short-term --- as soon as the tuple is dead to all transactions,
it can be marked with the existing LP_DEAD hint bit. And if it's only
useful for uniqueness checks, as seems to be the case, that's another
big restriction on the value.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2010-03-24 14:41:21 Re: WIP: preloading of ispell dictionary
Previous Message Pavel Stehule 2010-03-24 14:14:40 Re: WIP: preloading of ispell dictionary