A cardinality estimate function might be nice. SELECT cardinality_estimate(table_name) If it is off by 25% then no big deal. It would be useful for the PostgreSQL query planner also, I imagine.
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Wes Sent: Friday, January 14, 2005 2:59 PM To: Postgres general mailing list Subject: Re: [GENERAL] [HACKERS] Much Ado About COUNT(*) On 1/14/05 12:47 PM, "Frank D. Engel, Jr." <[EMAIL PROTECTED]> wrote: > It's probably too messy to be worthwhile this > way, though. More trouble than it would be worth. It would be rather useful if there was a way to get a reasonably accurate count (better than analyze provides) in a very short period. When you've got a relatively wide table that has hundreds of millions to over a billion rows, and you need to report on how many rows in the table, that can take a long time. Wes ---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings ---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings