Re: vacuum, performance, and MVCC

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: vacuum, performance, and MVCC
Дата
Msg-id 87k672wizo.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: vacuum, performance, and MVCC  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: vacuum, performance, and MVCC  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:

> PFC wrote:
> > 
> > > My idea is that if an UPDATE places the new tuple on the same page as
> > > the old tuple, it will not create new index entries for any indexes
> > > where the key doesn't change.
> > 
> >     Basically the idea behind preventing index bloat by updates is to have  
> > one index tuple point to several actual tuples having the same value.
> >     
> 
> The idea is not to avoid index bloat, but to allow heap reuse, and having
> one index entry for multiple versions of an UPDATEd row is merely an
> implementation detail.

It sort of sounds like you're describing a whole new index type that stores
only the page, not the precise record of any tuple it indexes. If your table
has only such indexes then you never need to worry about updating indexes if
your new tuple version goes on the same page as the old one.

It's an interesting thought experiment. It might trade off a lot of work in
index maintenance as well as saving space in the index for a lot of additional
work performing index scans. There can easily be enough tuples on a page to
make scanning the entire page pretty costly.


-- 
greg



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: posix_fadvise versus old kernels
Следующее
От: "Mark Woodward"
Дата:
Сообщение: Re: SO_SNDBUF size is small on win32?