Re: Prefix compression of B-Tree keys

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Prefix compression of B-Tree keys
Дата
Msg-id CAM3SWZSfC3Qv+DOVoYwFF-78s3HRGpvMMOw54XbKpioVXK7aFQ@mail.gmail.com
обсуждение исходный текст
Ответ на Prefix compression of B-Tree keys  (Claudio Freire <klaussfreire@gmail.com>)
Ответы Re: Prefix compression of B-Tree keys  (Claudio Freire <klaussfreire@gmail.com>)
Список pgsql-hackers
On Thu, Jan 30, 2014 at 9:26 PM, Claudio Freire <klaussfreire@gmail.com> wrote:
> Maybe not TOAST compression, but prefix compression.

I've thought about it as well. It's totally feasible, and likely
worthwhile, but a little more tricky.

> I've been wondering lately, whether a format change in the B-Tree
> could be worth the effort: store values with prefix compression. It
> would certainly help indexes of many kinds (text-valued, multi-column,
> etc...).

You can play tricks with the AM version, generally stored in the meta
page, as in the recent commit
36a35c550ac114caa423bcbe339d3515db0cd957, without breaking pg_upgrade.
Although a lot of these techniques may not actually require that kind
of additional effort.

> Now, I haven't checked if it's already done. Sorry if it is. I did
> mock around btree code a lot and don't remember any of this, but I do
> remember stuff that could be used to achieve it (specifically, all the
> index-only-scan machinery, which allows for implicit info).

I think it would make sense to do it on leaf pages, where there is
frequently a lot of redundancy. The reason that I myself wouldn't do
it first is that offhand I think that it'd be harder to come up with a
very generic infrastructure to make it work across diverse types, and
it isn't that useful where there isn't much redundancy in prefixes.
The B-Tree code doesn't really know anything about the type indexed,
and that's a useful property. But it's still definitely a useful goal.


-- 
Peter Geoghegan



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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: [bug fix] postgres.exe fails to start on Windows Server 2012 due to ASLR
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Regression tests failing if not launched on db "regression"