Search Postgresql Archives

Re: [HACKERS] Much Ado About COUNT(*)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>   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.

Attachment: pgpn3cpbQ7qfF.pgp
Description: PGP signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux