Re: counting algorithm for incremental matview maintenance

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: counting algorithm for incremental matview maintenance
Date: 2013-05-15 19:10:21
Message-ID: 5193DD9D.7010807@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Kevin,

It's fairly common for matviews to be constructed such that updates to
them are strictly appends. For example, a matview which has a daily
summary would just get appended to each day, and existing rows would not
change barring a major historical database cleanup.

It seems like we could ... and ought to ... optimize for this pattern
somehow for incremental updates. That is, if the user knows that we're
going to be only appending new rows and not modifying any old ones, s/he
ought to be able to tell the database that somehow and avoid the
overhead of checking. While the overhead of checking a count wouldn't
be that high for a few hundred rows, I've dealt with matviews which were
thousands to millions of rows.

--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Benedikt Grundmann 2013-05-15 19:50:49 Re: streaming replication, "frozen snapshot backup on it" and missing relfile (postgres 9.2.3 on xfs + LVM)
Previous Message Peter Geoghegan 2013-05-15 19:03:14 Re: Parallel Sort