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:
2005-01-11 20:15:41 from "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
2005-01-12 08:23:57 from Simon Riggs <simon(at)2ndquadrant(dot)com>
2005-01-12 08:53:43 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2005-01-12 10:38:55 from Reinhard Max <max(at)suse(dot)de>
2005-01-12 10:17:52 from Reinhard Max <max(at)suse(dot)de>
2005-01-12 15:29:23 from Peter Eisentraut <peter_e(at)gmx(dot)net>
2005-01-12 16:29:34 from Reinhard Max <max(at)suse(dot)de>
2005-01-12 17:20:14 from Reinhard Max <max(at)suse(dot)de>
2005-01-12 17:42:56 from "Jonah H(dot) Harris" <jharris(at)tvi(dot)edu>
2005-01-12 18:24:26 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2005-01-12 18:55:29 from "Jonah H(dot) Harris" <jharris(at)tvi(dot)edu>
2005-01-12 19:23:44 from Greg Stark <gsstark(at)mit(dot)edu>
2005-01-12 19:36:15 from "Jonah H(dot) Harris" <jharris(at)tvi(dot)edu>
2005-01-12 20:08:37 from Greg Stark <gsstark(at)mit(dot)edu>
2005-01-12 20:41:38 from Jeff Davis <jdavis-pgsql(at)empires(dot)org>
2005-01-12 21:43:46 from Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
2005-01-13 02:45:09 from Jeff Davis <jdavis-pgsql(at)empires(dot)org>
2005-01-13 03:19:18 from Greg Stark <gsstark(at)mit(dot)edu>
2005-01-13 03:50:57 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2005-01-12 21:42:06 from "Marek Mosiewicz" <marekmosiewicz(at)poczta(dot)onet(dot)pl>
2005-01-12 19:41:56 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2005-01-12 19:52:53 from "Jonah H(dot) Harris" <jharris(at)tvi(dot)edu>
2005-01-12 20:09:04 from Rod Taylor <pg(at)rbt(dot)ca>
2005-01-12 20:59:07 from "Jonah H(dot) Harris" <jharris(at)tvi(dot)edu>
2005-01-12 21:45:51 from Simon Riggs <simon(at)2ndquadrant(dot)com>
2005-01-12 21:58:14 from "Jonah H(dot) Harris" <jharris(at)tvi(dot)edu>
2005-01-12 22:03:58 from Rod Taylor <pg(at)rbt(dot)ca>
2005-01-12 20:14:51 from "Andrew Dunstan" <andrew(at)dunslane(dot)net>
2005-01-12 20:42:58 from "Jonah H(dot) Harris" <jharris(at)tvi(dot)edu>
2005-01-12 21:02:23 from Jon Jensen <jon(at)endpoint(dot)com>
2005-01-12 21:06:32 from "Jonah H(dot) Harris" <jharris(at)tvi(dot)edu>
2005-01-12 21:17:57 from Jeff Davis <jdavis-pgsql(at)empires(dot)org>
2005-01-12 21:36:55 from "Jonah H(dot) Harris" <jharris(at)tvi(dot)edu>
2005-01-12 21:20:43 from Bruno Wolff III <bruno(at)wolff(dot)to>
2005-01-12 21:56:25 from Bruno Wolff III <bruno(at)wolff(dot)to>
2005-01-12 21:48:33 from "Jonah H(dot) Harris" <jharris(at)tvi(dot)edu>
2005-01-18 20:45:50 from Sailesh Krishnamurthy <sailesh(at)cs(dot)berkeley(dot)edu>
2005-01-18 22:10:48 from Jeff Davis <jdavis-pgsql(at)empires(dot)org>
2005-01-18 22:29:16 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2005-01-18 22:42:32 from Sailesh Krishnamurthy <sailesh(at)cs(dot)berkeley(dot)edu>
2005-01-18 23:01:01 from Jeff Davis <jdavis-pgsql(at)empires(dot)org>
2005-01-19 05:09:53 from Christopher Browne <cbbrowne(at)acm(dot)org>
2005-01-12 20:59:51 from Jeff Davis <jdavis-pgsql(at)empires(dot)org>
2005-01-13 10:12:49 from Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
2005-01-13 04:15:58 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2005-01-13 04:54:52 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2005-01-13 04:57:56 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2005-01-13 05:06:38 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2005-01-13 05:25:09 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2005-01-13 05:39:56 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2005-01-13 14:04:46 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2005-01-13 15:29:16 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2005-01-13 18:22:42 from "D'Arcy J(dot)M(dot) Cain" <darcy(at)druid(dot)net>
2005-01-13 19:20:36 from "Jonah H(dot) Harris" <jharris(at)tvi(dot)edu>
2005-01-16 19:49:45 from Manfred Koizar <mkoi-pg(at)aon(dot)at>
2005-01-16 20:11:37 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2005-01-16 20:22:11 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2005-01-17 00:53:01 from "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>
2005-01-17 01:01:36 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2005-01-17 01:24:57 from Jochem van Dieten <jochemd(at)gmail(dot)com>
2005-01-17 01:28:07 from "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>
2005-01-17 01:32:02 from "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>
2005-01-17 01:34:58 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2005-01-22 21:19:16 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2005-01-16 20:38:31 from Jochem van Dieten <jochemd(at)gmail(dot)com>
2005-01-22 20:06:33 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2005-01-23 08:36:10 from Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com>
2005-01-23 21:36:18 from "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>
2005-01-23 23:41:55 from Mark Kirkwood <markir(at)coretech(dot)co(dot)nz>
2005-01-24 15:28:09 from "Jonah H(dot) Harris" <jharris(at)tvi(dot)edu>
2005-01-25 07:33:57 from Manfred Koizar <mkoi-pg(at)aon(dot)at>
2005-01-25 12:03:28 from Christopher Browne <cbbrowne(at)acm(dot)org>
2005-01-12 18:36:52 from Reinhard Max <max(at)suse(dot)de>
2005-01-12 19:11:32 from Reinhard Max <max(at)suse(dot)de>
2005-01-12 19:59:42 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2005-01-12 20:10:16 from Reinhard Max <max(at)suse(dot)de>
2005-01-12 21:38:44 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2005-01-12 19:28:39 from Kurt Roeckx <Q(at)ping(dot)be>
2005-01-12 19:34:40 from Reinhard Max <max(at)suse(dot)de>
Lists:
pgsql-announce pgsql-hackers pgsql-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