| From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
|---|---|
| To: | Dann Corbit <DCorbit(at)connx(dot)com> |
| Cc: | Wes <wespvp(at)syntegra(dot)com>, Postgres general mailing list <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: [HACKERS] Much Ado About COUNT(*) |
| Date: | 2005-01-14 23:37:49 |
| Message-ID: | 20050114233745.GH1724@svana.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Fri, Jan 14, 2005 at 03:11:32PM -0800, Dann Corbit wrote:
> 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.
If that's all you want, what about the row estimate from pg_class? It
has the number of rows active at last vacuum... For really large tables
I imagine it'd be easily close enough...
Hope this helps,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2005-01-14 23:43:25 | Re: Parsing of backslash in statements via ODBC |
| Previous Message | Terry Lee Tucker | 2005-01-14 23:34:38 | Re: OID Usage |