Skip site navigation (1) Skip section navigation (2)

Re: Much Ado About COUNT(*)

From: "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>
To: Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>,pgsql-hackers(at)postgresql(dot)org
Subject: Re: Much Ado About COUNT(*)
Date: 2005-01-23 21:36:18
Message-ID: 20050123213618.GY67721@decibel.org (view raw or flat)
Thread:
Lists: pgsql-announcepgsql-hackerspgsql-patches
On Sun, Jan 23, 2005 at 12:36:10AM -0800, Ron Mayer wrote:
> Bruce Momjian wrote:
> >Added to TODO based on this discusion:... 
> >* Speed up COUNT(*)
> 
> One think I think would help lots of people is if the
> documentation near the COUNT aggregate explained some
> of the techniques using triggers to maintain a count
> for tables where this is important.
> 
> For every one person who reads the mailinglist archives,
> I bet there are dozens who merely read the product
> documentation and never find the workaround/solution.
> 
> Perhaps a note below the table here:
> http://www.postgresql.org/docs/8.0/interactive/functions-aggregate.html#FUNCTIONS-AGGREGATE-TABLE
> would be a good place.   If it is already somewhere in
> the docs; perhaps the page I linked should refer to the
> other page as well.

Does anyone have working code they could contribute? It would be best to
give at least an example in the docs. Even better would be something in
pgfoundry that helps build a summary table and the rules/triggers you
need to maintain it.
-- 
Jim C. Nasby, Database Consultant               decibel(at)decibel(dot)org 
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"

In response to

Responses

pgsql-announce by date

Next:From: Mark KirkwoodDate: 2005-01-23 23:41:55
Subject: Re: Much Ado About COUNT(*)
Previous:From: Ron MayerDate: 2005-01-23 08:36:10
Subject: Re: Much Ado About COUNT(*)

pgsql-hackers by date

Next:From: Jim C. NasbyDate: 2005-01-23 21:42:48
Subject: Re: [pgsql-hackers] Re: Extending System Views: proposal for 8.1/8.2
Previous:From: Jim C. NasbyDate: 2005-01-23 21:34:23
Subject: Re: Extending System Views: proposal for 8.1/8.2

pgsql-patches by date

Next:From: Stephen FrostDate: 2005-01-23 22:05:28
Subject: Re: [PATCHES] Merge pg_shadow && pg_group -- UNTESTED
Previous:From: Alvaro HerreraDate: 2005-01-23 21:15:49
Subject: Re: [PATCHES] Merge pg_shadow && pg_group -- UNTESTED

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group