Re: Materialized view vs. view

From: Melvin Davidson <melvin6925(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: Job <Job(at)colliniconsulting(dot)it>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Materialized view vs. view
Date: 2017-01-10 18:44:12
Message-ID: CANu8FiyCcXtOHb_C4=q-C36Zum+ivJaUuN+PPdf-KjYNFaPLLg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jan 10, 2017 at 1:36 PM, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)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(dot)klaver(at)aklaver(dot)com
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vick Khera 2017-01-10 18:50:32 Re: i got a process holding the lock
Previous Message David G. Johnston 2017-01-10 18:42:57 Re: Materialized view vs. view