Re: AW: Plans for solving the VACUUM problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at>
Cc: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: AW: Plans for solving the VACUUM problem
Date: 2001-05-18 13:47:55
Message-ID: 15097.990193675@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at> writes:
> foreach tuple in heap that can be deleted do:
> foreach index
> call the current "index delete" with constructed key and xtid

See discussion with Hiroshi. This is much more complex than TID-based
delete and would be faster only for small numbers of tuples. (Very
small numbers of tuples, is my gut feeling, though there's no way to
prove that without implementations of both in hand.)

A particular point worth making is that in the common case where you've
updated the same row N times (without changing its index key), the above
approach has O(N^2) runtime. The indexscan will find all N index tuples
matching the key ... only one of which is the one you are looking for on
this iteration of the outer loop.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Zeugswetter Andreas SB 2001-05-18 13:58:52 AW: AW: Plans for solving the VACUUM problem
Previous Message Klaus Reger 2001-05-18 13:31:35 Re: Grammar-problems with pl/pgsql in gram.y