Re: jsonb format is pessimal for toast compression

Поиск
Список
Период
Сортировка
От Alexander Korotkov
Тема Re: jsonb format is pessimal for toast compression
Дата
Msg-id CAPpHfdvPV4iCqjAK+k4+ZO0X2jN7kUEzPT4y2Pf4c52L=UZQJQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: jsonb format is pessimal for toast compression  (Teodor Sigaev <teodor@sigaev.ru>)
Список pgsql-hackers
On Fri, Aug 8, 2014 at 9:14 PM, Teodor Sigaev <teodor@sigaev.ru> wrote:
Curious idea: we could swap JEntry array and values: values in the
begining of type will be catched by pg_lzcompress. But we will need to
know offset of JEntry array, so header will grow up till 8 bytes
(actually, it will be a varlena header!)

May be I wasn't clear:jsonb type will start from string collection instead of JEntry array, JEntry array will be placed at the end of object/array. so, pg_lzcompress will find repeatable 4-byte pieces in first 1024 bytes of jsonb.

Another idea I have is that store offset in each JEntry is not necessary to have benefit of binary search. Namely what if we store offsets in each 8th JEntry and length in others? The speed of binary search will be about the same: overhead is only calculation offsets in the 8-entries chunk. But lengths will probably repeat. 

------
With best regards,
Alexander Korotkov. 
  

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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: psql: show only failed queries
Следующее
От: Ants Aasma
Дата:
Сообщение: Re: jsonb format is pessimal for toast compression