Re: counting algorithm for incremental matview maintenance

From: Kevin Grittner <kgrittn(at)ymail(dot)com>
To: Josh Berkus <josh(at)agliodbs(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: counting algorithm for incremental matview maintenance
Date: 2013-05-16 16:24:55
Message-ID: 1368721495.47296.YahooMailNeo@web162902.mail.bf1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:

> Let's say there is a table and matview like this:
>
> create table foo (fooid int primary key, val int not null);
> create materialized view bar as select distinct val from foo;

Some of the subsequent text doesn't make sense unless that
materialized view has an index, like this:

create unique index bar_val on bar (val);

Without such an index, it would need to use a plan which scanned
the entire bar relation for any maintenance.  Apologies for the
omission and any confusion it caused.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2013-05-16 16:29:25 Re: Logging of PAM Authentication Failure
Previous Message Tom Lane 2013-05-16 16:08:40 Re: Better LWLocks with compare-and-swap (9.4)