Re: Best way to keep track of a sliced TOAST

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Best way to keep track of a sliced TOAST
Дата
Msg-id CA+Tgmob2TxV9BTSwyDYsigHGK87bH3nN_ANhkO8GN4owNOrutg@mail.gmail.com
обсуждение исходный текст
Ответ на RE: Best way to keep track of a sliced TOAST  (Bruno Hass <bruno_hass@live.com>)
Список pgsql-hackers
On Wed, Mar 20, 2019 at 9:20 PM Bruno Hass <bruno_hass@live.com> wrote:
> I would like to optimize the jsonb key access operations. I could not find the discussion you've mentioned, but I am
givingsome thought to the idea.
 
>
> Instead of storing lengths, could we dedicate the first chunk of the TOASTed jsonb to store where each key is
located?Would it be a good idea?
 

I don't see how that would work.  To know which key is which, you'd
have to store all the keys.  They might not fit in the first chunk.
That's the whole reason this has to be TOASTed to begin with.

> You've mentioned that the current jsonb format is byte-oriented. Does that imply that a single jsonb key value might
besplit between multiple chunks?
 

Yes.

You're going to need to look at the code yourself to get anywhere
here... I don't have unlimited time to answer questions about it, and
even if I did, you're not really going to understand how it works
without studying it yourself.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Connections hang indefinitely while taking a gin index's LWLockbuffer_content lock
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [proposal] Add an option for returning SQLSTATE in psql error message