Re: Improving count(*)

From: Tom Lane
To: Simon Riggs
Cc: Kevin Grittner , pgsql-hackers(at)postgresql(dot)org
Subject: Re: Improving count(*)
Date: 2005-11-18 00:17:15
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Simon Riggs 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...)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dann Corbit 2005-11-18 00:34:02 Re: Improving count(*)
Previous Message Tom Lane 2005-11-18 00:10:00 Re: Some array semantics issues