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

Поиск
Список
Период
Сортировка
От Jochem van Dieten
Тема Re: possible TODO: read-only tables, select from indexes only.
Дата
Msg-id f96a9b830504220853670bf7cd@mail.gmail.com
обсуждение исходный текст
Ответ на possible TODO: read-only tables, select from indexes only.  (Hannu Krosing <hannu@tm.ee>)
Ответы Re: possible TODO: read-only tables, select from indexes only.  (Ron Mayer <rm_pg@cheapcomplexdevices.com>)
Список pgsql-hackers
On 4/22/05, Hannu Krosing wrote:
> Fetching data from just indexes has been discussed on this list several
> times before, and it has been told that this can't be done with postgres
> thanks to MVCC.
>
> 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.
>
> If table has been VACUUM'ed or REINDEX'ed after last change
> (update/delete/insert), then there is 1-1 correspondence between table
> and indexes, and thus no need to fetch the tuple from heap for extra
> visibility checks.
>
> 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.

Jochem


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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Woo hoo ... a whole new set of compiler headaches!! :)