From: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
---|---|
To: | Seamus Abshere <seamus(at)abshere(dot)net> |
Cc: | PostgreSQL General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Read-only tables to avoid row visibility check |
Date: | 2016-02-22 22:38:59 |
Message-ID: | CAHyXU0yNbOSDBeDhGJ_CVQ4v46KsVqfUq4wjiRH8QzD3yRPCWA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, Feb 22, 2016 at 2:35 PM, Seamus Abshere <seamus(at)abshere(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Melvin Davidson | 2016-02-22 22:42:23 | Re: Get the date of creation of objects in the database |
Previous Message | Nicklas Aven | 2016-02-22 22:35:18 | Re: ERROR: cannot convert relation containing dropped columns to view |