Search Postgresql Archives

Re: Materialized view vs. view

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 10, 2017 at 11:27 AM, Job <Job@xxxxxxxxxxxxxxxxxxxx> 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.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux