Re: Materialized views WIP patch

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Materialized views WIP patch
Дата
Msg-id 1362671729.11638.YahooMailNeo@web162904.mail.bf1.yahoo.com
обсуждение исходный текст
Ответ на Re: Materialized views WIP patch  ("David E. Wheeler" <david@justatheory.com>)
Ответы Re: Materialized views WIP patch  ("David E. Wheeler" <david@justatheory.com>)
Список pgsql-hackers
David E. Wheeler <david@justatheory.com> wrote:
> Kevin Grittner <kgrittn@ymail.com> wrote:
>
>> I also think that something should be done about the
>> documentation for indexes.  Right now that always refers to a
>> "table".  It would clearly be awkward to change that to "table
>> or materialized view" everywhere.  I wonder if most of thosse
>> should be changed to "relation" with a few mentions that the
>> relation could be a table or a materialized view, or whether
>> some less intrusive change would be better.  Opinions welcome.
>
> Isn’t a materialized view really just a table that gets updated
> periodically?

Not exactly.  It is a relation which has some characteristics of a
view (including an entry in pg_rewrite exactly like that for a
view) and some characteristics of a table (including a heap and
optional indexes).  Whether it looks more like a table or more like
a view depends on how you tilt your head.  You could just as easily
say that it is really just a view which periodically caches its
results on disk.  They really are "their own thing".  As future
releases add more subtle "freshness" concepts, incremental updates,
and query rewrite that unique identity will become even more
conspicuous, I think.

> And isn’t a non-matierialized view also thought of as a
> “relation”?

Yes.  Tables, views, and materialized views are all relations.

> If the answer to both those questions is “yes,” I think the term
> should remain “table,” with a few mentions that the term includes
> materialized views (and excludes foreign tables).

And if the answers are "not exactly" and "yes"?

--
Kevin Grittner
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Performance Improvement by reducing WAL for Update Operation
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: odd behavior in materialized view