Re: possible TODO: read-only tables, select from indexes only. - Mailing list pgsql-hackers

From Ron Mayer
Subject Re: possible TODO: read-only tables, select from indexes only.
Date
Msg-id 42694E9B.4030809@cheapcomplexdevices.com
Whole thread Raw
In response to Re: possible TODO: read-only tables, select from indexes only.  (Jochem van Dieten <jochemd@gmail.com>)
List pgsql-hackers
Jochem van Dieten wrote:
> On 4/22/05, Hannu Krosing wrote:
>>...But this is true only when data is changing. In a data-warehousing
>>scenario what it is often needed is a possibility for fast querying of
>>static historical data.

And when we get partitioning, I think many data warehouses will have
the bulk of their data in tables like that (previous quarters marked
read-only, current quarter growing).

>>What I am proposing is
>>
>>1) possibility to explicitly change table status to READ-ONLY .
>>2) setting a flag CAN_OMIT_HEAP_CHECK after REINDEX TABLE for tables
>>that are READ-ONLY
> 
> Why stop at indexes? If you switch to readonly status with a CLUSTER
> or ALTER TABLE command you can even remove the visibility information
> from the heap tuples. Visibility would be exclusively controlled by
> the visibility of the table in the catalog, i.e. all or nothing.

Seems this could reduce the size of some data warehouses considerably
too.   My biggest tables have nothing but columns of IDs; and the
30-some bytes of the row header is a significant fraction of the
entire size.  I think the diskspace === I/O bandwidth savings on
the heap would be almost as big a benefit as the indexes.



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Woo hoo ... a whole new set of compiler headaches!! :)
Next
From: Tom Lane
Date:
Subject: Re: Bitmap scans vs. the statistics views