From: | Steve Wampler <swampler(at)noao(dot)edu> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Simon Riggs <simon(at)2ndquadrant(dot)com>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Improving count(*) |
Date: | 2005-11-18 12:55:38 |
Message-ID: | 437DCF4A.9030802@noao.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Simon Riggs <simon(at)2ndquadrant(dot)com> writes:
>
>>From here, another proposal. We have a GUC called count_uses_estimate
>>that is set to off by default. If set to true, then a count(*) will use
>>the planner logic to estimate number of rows in the table and return
>>that as the answer, rather than actually count the row.
>
>
> Ugh. Why not just provide a function to retrieve the planner estimate,
> but *not* call it count(*)? It would fit nicely with the contrib/dbsize
> stuff (or I should say, the stuff formerly in dbsize...)
That would completely remove my needs for a fast count() - all I want
is a way to quickly estimate table sizes for an operator's display. Tom's
suggestion would provide exactly that.
--
Steve Wampler -- swampler(at)noao(dot)edu
The gods that smiled on your birth are now laughing out loud.
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2005-11-18 13:04:21 | Re: Optional postgres database not so optional in 8.1 |
Previous Message | Andreas Pflug | 2005-11-18 12:07:47 | Re: Numeric 508 datatype |