Re: [GENERAL] Materialized view vs. view

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: [GENERAL] Materialized view vs. view
Дата
Msg-id CAKFQuwbNB8CxvZsS8n=Bsb1bfeoLWgKZr=FrDeu9-fT1C7wcaQ@mail.gmail.com
обсуждение исходный текст
Ответ на [GENERAL] Materialized view vs. view  (Job <Job@colliniconsulting.it>)
Список pgsql-general
On Tue, Jan 10, 2017 at 11:27 AM, Job <Job@colliniconsulting.it> wrote:
Hi guys,
 
i am making some tests with a massive number of "select" queries (only for reading datas) on a view and a materialized view.
We use Postgresql 9.6.1 on a 64bit server.
 
Only for "select" queries, which one is faster and less expensive as resources cost?
The view or the materialized view?

The view has about 500K lines.


There is no simple answer to this - it all depends upon your actual usage.  With proper indexes and a disregard for the "REFRESH MATERIALIZED VIEW ..." command cost the materialized view should always perform better.  But most people don't get to disregard the refresh dynamic imposed by materialized views.

David J.

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

Предыдущее
От: Melvin Davidson
Дата:
Сообщение: Re: [GENERAL] i got a process holding the lock
Следующее
От: Melvin Davidson
Дата:
Сообщение: Re: [GENERAL] Materialized view vs. view