Re: [GENERAL] Materialized view vs. view - Mailing list pgsql-general

From Melvin Davidson
Subject Re: [GENERAL] Materialized view vs. view
Date
Msg-id CANu8FiyCcXtOHb_C4=q-C36Zum+ivJaUuN+PPdf-KjYNFaPLLg@mail.gmail.com
Whole thread Raw
In response to Re: [GENERAL] Materialized view vs. view  (Adrian Klaver <adrian.klaver@aklaver.com>)
Responses Re: [GENERAL] Materialized view vs. view  (Kevin Grittner <kgrittn@gmail.com>)
List pgsql-general


On Tue, Jan 10, 2017 at 1:36 PM, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
On 01/10/2017 10:27 AM, Job wrote:
Hi guys,

iam 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?

If are running tests as you state above, you should know or am I missing something?



The view has about 500K lines.

Thank you!
/F


--
Adrian Klaver
adrian.klaver@aklaver.com


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

fyi, a view is nothing more than just that, a view.
A materialized view, afaic, is a misleading name, it is actually a valid table and you can create indexes on them,
so theoretically you should be able to reduce response time on them.

--
Melvin Davidson
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.

pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: [GENERAL] Materialized view vs. view
Next
From: Vick Khera
Date:
Subject: Re: [GENERAL] i got a process holding the lock