[HACKERS] Performance Improvement for Unique Indexes

2010-03-24 Thread Gokulakannan Somasundaram
Hi, 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

Re: [HACKERS] Performance Improvement for Unique Indexes

2010-03-24 Thread Gokulakannan Somasundaram
How are you going to unmark the hint bit in case of a rollback? Only after you find that the transaction is committed, this hint bit has to be set. It is equivalent to any other hint bit. Gokul.

Re: [HACKERS] Performance Improvement for Unique Indexes

2010-03-24 Thread Tom Lane
Gokulakannan Somasundaram gokul...@gmail.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

Re: [HACKERS] Performance Improvement for Unique Indexes

2010-03-24 Thread Gokulakannan Somasundaram
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