Re: [GENERAL] Read-only tables to avoid row visibility check

2016-02-22 Thread Tom Lane
Seamus Abshere writes: > Being able to tell postgres that our table is "Read Only" has imaginary > mystical properties for me, first and foremost being able to count > against indexes without ever hitting the disk. >> ​If the system is working properly then a READ ONLY

Re: [GENERAL] Read-only tables to avoid row visibility check

2016-02-22 Thread Merlin Moncure
On Mon, Feb 22, 2016 at 2:35 PM, Seamus Abshere 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

Re: [GENERAL] Read-only tables to avoid row visibility check

2016-02-22 Thread Seamus Abshere
On Mon, Feb 22, 2016, at 06:48 PM, David G. Johnston wrote: > it would probably be more constructive to actually communicate the thoughts > that provoked the question. My company has a largish table - 250+ columns, 1 row for every household in the US. It's read-only. We've gotten advice to

Re: [GENERAL] Read-only tables to avoid row visibility check

2016-02-22 Thread David G. Johnston
On Mon, Feb 22, 2016 at 2:38 PM, Seamus Abshere wrote: > On Mon, Feb 22, 2016, at 06:30 PM, Melvin Davidson wrote: > > However, at this time, there is no such option as SET READ ONLY in any > version of PostgreSQL. > > I know. > > I am wondering if hypothetical read-only

Re: [GENERAL] Read-only tables to avoid row visibility check

2016-02-22 Thread Seamus Abshere
On Mon, Feb 22, 2016, at 06:30 PM, Melvin Davidson wrote: > However, at this time, there is no such option as SET READ ONLY in any > version of PostgreSQL. I know. I am wondering if hypothetical read-only tables would make index-only scans more possible by avoiding the need for row visibility

Re: [GENERAL] Read-only tables to avoid row visibility check

2016-02-22 Thread Melvin Davidson
First of all, it would be really nice if you mentioned the version of PostgreSQL and O/S when posing questions. That being said, that wiki is a _discussion_, and as such, a suggestion on how it "might" be implemented. However, at this time, there is no such option as SET READ ONLY in any version

[GENERAL] Read-only tables to avoid row visibility check

2016-02-22 Thread Seamus Abshere
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? Thanks, Seamus -- Seamus Abshere, SCEA +598 99 54 99 54