Unix Technical Forum

Approximate count(*)

This is a discussion on Approximate count(*) within the Pgsql Patches forums, part of the PostgreSQL category; --> Folks, Please find enclosed a patch that shows how to get a quick approximation of count(*) on a table. ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Patches

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-17-2008, 11:11 PM
David Fetter
 
Posts: n/a
Default Approximate count(*)

Folks,

Please find enclosed a patch that shows how to get a quick
approximation of count(*) on a table.

Cheers,
D
--
David Fetter david@fetter.org http://fetter.org/
phone: +1 510 893 6100 mobile: +1 415 235 3778

Remember to vote!


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-17-2008, 11:11 PM
Tom Lane
 
Posts: n/a
Default Re: [DOCS] Approximate count(*)

David Fetter <david@fetter.org> writes:
> Please find enclosed a patch that shows how to get a quick
> approximation of count(*) on a table.


I'm not sure we should be encouraging people to look at reltuples...
for one thing, it's deliberately a moving average under 8.0.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-17-2008, 11:11 PM
David Fetter
 
Posts: n/a
Default Re: [DOCS] Approximate count(*)

On Thu, Mar 24, 2005 at 12:34:51PM -0500, Tom Lane wrote:
> David Fetter <david@fetter.org> writes:
> > Please find enclosed a patch that shows how to get a quick
> > approximation of count(*) on a table.

>
> I'm not sure we should be encouraging people to look at reltuples...
> for one thing, it's deliberately a moving average under 8.0.


Should there be more caveats?

Cheers,
D
--
David Fetter david@fetter.org http://fetter.org/
phone: +1 510 893 6100 mobile: +1 415 235 3778

Remember to vote!

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:19 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com