Re: Read-only tables to avoid row visibility check

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: Read-only tables to avoid row visibility check
Дата
Msg-id CAHyXU0yNbOSDBeDhGJ_CVQ4v46KsVqfUq4wjiRH8QzD3yRPCWA@mail.gmail.com
обсуждение исходный текст
Ответ на Read-only tables to avoid row visibility check  (Seamus Abshere <seamus@abshere.net>)
Список pgsql-general
On Mon, Feb 22, 2016 at 2:35 PM, Seamus Abshere <seamus@abshere.net> wrote:
> hi,
>
> https://wiki.postgresql.org/wiki/ReadOnlyTables mentions the possibility
> of `ALTER TABLE table SET READ ONLY`.
>
> Would this mean that row visibility checks could be skipped and thus
> index-only scans much more common?

Personally I don't see how that buys you very much.  Right now you can
VACUUM the table which will update the visibility map, allowing index
only scans to be chosen.  Visibility checks are also already optimized
away by the database over time via hint bits.

I think the optimization you are looking for is to have the database
exploit the fact that when the table is created and/or loaded in a
single transaction, it marks everything visible and valid by default
and then wipes it all away should the insert fail.

merlin


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

Предыдущее
От: Nicklas Aven
Дата:
Сообщение: Re: ERROR: cannot convert relation containing dropped columns to view
Следующее
От: Melvin Davidson
Дата:
Сообщение: Re: Get the date of creation of objects in the database