Re: Unsplitting btree index leaf pages

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Unsplitting btree index leaf pages
Дата
Msg-id 17373.1135210043@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Unsplitting btree index leaf pages  (Simon Riggs <simon@2ndquadrant.com>)
Ответы Re: Unsplitting btree index leaf pages  (Simon Riggs <simon@2ndquadrant.com>)
Список pgsql-hackers
Simon Riggs <simon@2ndquadrant.com> writes:
> While we scan, if we found two adjacent pages, both of which have less
> than (say) 40% rows, we could re-join or "unsplit" those pages together.

Curiously enough, this has been thought of before.  It is not as easy
as you think, or it would have been done the first time around.
nbtree/README explains why:

: We consider deleting an entire page from the btree only when it's become
: completely empty of items.  (Merging partly-full pages would allow better
: space reuse, but it seems impractical to move existing data items left or
: right to make this happen --- a scan moving in the opposite direction
: might miss the items if so.  We could do it during VACUUM FULL, though.)
        regards, tom lane


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Unsplitting btree index leaf pages
Следующее
От: Manfred Koizar
Дата:
Сообщение: Re: Re: Which qsort is used