Re: AW: Plans for solving the VACUUM problem

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: AW: Plans for solving the VACUUM problem
Дата
Msg-id 15097.990193675@sss.pgh.pa.us
обсуждение исходный текст
Ответ на AW: Plans for solving the VACUUM problem  (Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>)
Список pgsql-hackers
Zeugswetter Andreas SB  <ZeugswetterA@wien.spardat.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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Klaus Reger
Дата:
Сообщение: Re: Grammar-problems with pl/pgsql in gram.y
Следующее
От: Zeugswetter Andreas SB
Дата:
Сообщение: AW: AW: Plans for solving the VACUUM problem