Skip site navigation (1) Skip section navigation (2)

Re: possible TODO: read-only tables, select from indexes only.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>,pgsql-hackers(at)postgresql(dot)org
Subject: Re: possible TODO: read-only tables, select from indexes only.
Date: 2005-04-23 22:27:38
Message-ID: 22415.1114295258@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com> writes:
> Is this a fair summary of the potential benefits of READ-ONLY
> tables? (from both this thread and the archives):

>   1.  Index-only scans are made possible fairly easily because
>       you wouldn't need to check the heap for visibility.

>   2.  Simple tables can be much smaller since you don't need
>       most of the HeapTupleHeaderData.

What you are talking about is not a "read only" table, it is a
"non-MVCC" table.  This is a much greater assault on the fundamental
semantics of Postgres than it's being painted to be in this thread.
In particular, how is such a table going to come into being?  You'd
not be able to just flip the READ-ONLY flag on and off.

(The notion of having tuples in the system that don't have the standard
HeapTupleHeader is not as easy to implement as you might think, either,
because that data structure is *everywhere*.)

While I don't say it's impossible to do, I do think that the work and
semantic ugliness involved would outweigh the possible benefits.  In
particular, there are other, more transparent ways of doing #1.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2005-04-23 23:24:56
Subject: Re: possible TODO: read-only tables, select from indexes only.
Previous:From: Ron MayerDate: 2005-04-23 22:12:12
Subject: Re: possible TODO: read-only tables, select from indexes

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group