| From: | Mark Mielke <mark(at)mark(dot)mielke(dot)cc> | 
|---|---|
| To: | Gregory Stark <stark(at)enterprisedb(dot)com> | 
| Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> | 
| Subject: | Re: count(*) performance improvement ideas | 
| Date: | 2008-03-12 18:22:11 | 
| Message-ID: | 47D81F53.1000001@mark.mielke.cc | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
Gregory Stark wrote:
> In an ideal world I would love to be able to do something like:
>
> CREATE MATERIALIZED VIEW foo AS (select count(*) from bar) WITH INCREMENTAL UPDATES;
>
> and have that automatically create both a heap to store the count and another
> to store the incremental changes. To do this would require some magic to know
> what "incremental changes" means for each aggregate where it's meaningful
> though.
>
> Then it would require some magic in the optimizer to recognize when piece of
> the query can be satisfied by a materialized view.
>   
Hehe... +5 if you think it can be done in the next 12 - 24 months. :-)
Cheers,
mark
-- 
Mark Mielke <mark(at)mielke(dot)cc>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Greg Smith | 2008-03-12 18:24:04 | Re: [HACKERS] Move the developers wiki? | 
| Previous Message | Magnus Hagander | 2008-03-12 18:21:46 | Re: Re: TODO-list on wiki (was: TODO update about SQLSTATE to PGconn) |