Zeugswetter Andreas SB  <[EMAIL PROTECTED]> 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

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to