Re: MaxOffsetNumber for Table AMs

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема Re: MaxOffsetNumber for Table AMs
Дата
Msg-id CAMT0RQRLO3+37niz_pU9uOi+CqVi0HzFgLuWdLzs_Bffp8KWhw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: MaxOffsetNumber for Table AMs  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Thu, May 6, 2021 at 3:07 AM Robert Haas <robertmhaas@gmail.com> wrote:
>
> On Wed, May 5, 2021 at 3:43 PM Matthias van de Meent
> > Storage gains for index-oriented tables can become as large as the
> > size of the primary key by not having to store all primary key values
> > in both the index and the table; which can thus be around 100% of a
> > table in the least efficient cases of having a PK over all columns.
> >
> > Yes, this might be indeed only a 'small gain' for access latency, but
> > not needing to store another copy of your data (and keeping it in
> > cache, etc.) is a significant win in my book.
>
> This is a really good point. Also, if the table is ordered by a
> synthetic logical TID, range scans on the primary key will be less
> efficient than if the primary key is itself the TID. We have the
> ability to CLUSTER on an index for good reasons, and "Automatically
> maintain clustering on a table" has been on the todo list forever.
> It's hard to imagine this will ever be achieved with the current heap,
> though: the way to get there is to have a table AM for which this is
> an explicit goal.

But would this not have the downside that all the secondary indexes
will blow up as they now need to have the full table row as the TID  ?

-----
Hannu Krosing



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: PG in container w/ pid namespace is init, process exits cause restart
Следующее
От: David Fetter
Дата:
Сообщение: Re: pg_receivewal makes a bad daemon