Re: Performance-improvement idea: shortcircuit unique-index checks - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Performance-improvement idea: shortcircuit unique-index checks
Date
Msg-id 200102192112.QAA02073@candle.pha.pa.us
Whole thread Raw
In response to Performance-improvement idea: shortcircuit unique-index checks  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Performance-improvement idea: shortcircuit unique-index checks  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> I'm not quite sure how to implement this, but I wanted to toss the idea
> out for discussion.  Probably we'd have to have some cooperation between
> the heap_update level (where the fact that it's an update is known, and
> where we'd have a chance to test for changes in particular columns) and
> the index access level.  Maybe it's wrong for the index access level to
> have primary responsibility for uniqueness checks in the first place.
> 
> Obviously this isn't going to happen for 7.1, but it might make a nice
> performance improvement for 7.2.

Seems a better solution would be to put a 'deleted' bit in the index so
we would have to visit those heap tuples only once for a committed
status.  Similar to what we do with heap tuples so we don't have to
visit pg_log repeatedly.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Jan Wieck
Date:
Subject: Re: GET DIAGNOSTICS (was Re: Open 7.1 items)
Next
From: Tom Lane
Date:
Subject: Re: Performance-improvement idea: shortcircuit unique-index checks