Re: Much Ado About COUNT(*) - Mailing list pgsql-hackers

From Jim C. Nasby
Subject Re: Much Ado About COUNT(*)
Date
Msg-id 20050123213618.GY67721@decibel.org
Whole thread Raw
In response to Re: Much Ado About COUNT(*)  (Ron Mayer <rm_pg@cheapcomplexdevices.com>)
Responses Re: Much Ado About COUNT(*)  (Mark Kirkwood <markir@coretech.co.nz>)
List pgsql-hackers
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@decibel.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?"


pgsql-hackers by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: Extending System Views: proposal for 8.1/8.2
Next
From: "Jim C. Nasby"
Date:
Subject: Re: [pgsql-hackers] Re: Extending System Views: proposal for 8.1/8.2