Re: [WIP] [B-Tree] Keep indexes sorted by heap physical location

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: [WIP] [B-Tree] Keep indexes sorted by heap physical location
Дата
Msg-id CAM3SWZQxKE_OkraLws0D2-KKSzWAe52X+ezKoofLd1Eis6vUmQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [WIP] [B-Tree] Keep indexes sorted by heap physical location  (Peter Geoghegan <pg@heroku.com>)
Ответы Re: [WIP] [B-Tree] Keep indexes sorted by heap physical location
Список pgsql-hackers
On Thu, Aug 18, 2016 at 2:15 PM, Peter Geoghegan <pg@heroku.com> wrote:
> I think that this is a bad idea. We need to implement suffix
> truncation of internal page index tuples at some point, to make them
> contain less information from the original leaf page index tuple.
> That's an important optimization, because it increases fan-in. This
> seems like a move in the opposite direction.

Maybe I was too hasty, here. Can you rebase this patch, Claudio?

It's possible that this idea could have further non-obvious benefits.
I see some potential for this to help with nbtree page deletion, item
recycling, etc. For example, maybe VACUUM can manage to do something
much closer to a regular index scan when that seems to make sense --
Andres (CC'd) has talked about this before. And, maybe we get a
benefit from localizing where the LP_DEAD bit can be set for the
kill_prior_tuple stuff to work in UPDATE-heavy workloads. Naturally,
there'd often be some kind of locality in terms of older row versions
belonging earlier in the heap, versions which can be concentrated onto
one leaf page with this patch. As newer updates make it look like the
leaf page needs to be split, there is a concentration of LP_DEAD-set
line items to reclaim space from, letting some UPDATEs (index tuple
inserters) defer the split. There is a lot less value in the LP_DEAD
stuff if reclaimable line items are sprayed all over the place, which
seems quite possible to me on current versions.

I also think that this might help with bitmap index scans.

-- 
Peter Geoghegan



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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Mail thread references in commits
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: Patch: Implement failover on libpq connect level.