Re: Much Ado About COUNT(*)

From: "Jonah H(dot) Harris" <jharris(at)tvi(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Much Ado About COUNT(*)
Date: 2005-01-12 18:55:29
Message-ID: 41E572A1.8050209@tvi.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-announce pgsql-hackers pgsql-patches

Tom,

Thank you for your prompt response and I understand your statement
completely.

My thinking is that we may be able to implement index usage for not only
unqualified counts, but also on any query that can be satisfied by the
index itself. Index usage seems to be a feature that could speed up
PostgreSQL for many people. I'm working on a project right now that
could actually take advantage of it.

Looking at the message boards, there is significant interest in the
COUNT(*) aspect. However, rather than solely address the COUNT(*) TODO
item, why not fix it and add additional functionality found in
commercial databases as well? I believe Oracle has had this feature
since 7.3 and I know people take advantage of it.

I understand that you guys have a lot more important stuff to do than
work on something like this. Unlike other people posting the request and
whining about the speed, I'm offering to take it on and fix it.

Take this mesage as my willingness to propose and implement this
feature. Any details, pitfalls, or suggestions are appreciated.

Thanks again!

-Jonah

Tom Lane wrote:

>"Jonah H. Harris" <jharris(at)tvi(dot)edu> writes:
>
>
>>Tom, Bruce, and others involved in this recurring TODO discussion…
>>First, let me start by saying that I understand this has been discussed
>>many times before; however, I’d like to see what the current state of
>>affairs is regarding the possibility of using a unique index scan to
>>speed up the COUNT aggregate.
>>
>>
>
>It's not happening, because no one has come up with a workable proposal.
>In particular, we're not willing to slow down every other operation in
>order to make COUNT-*-with-no-WHERE-clause faster.
>
> regards, tom lane
>
>

In response to

Responses

Browse pgsql-announce by date

  From Date Subject
Next Message Reinhard Max 2005-01-12 19:11:32 Re: [HACKERS] segfault caused by heimdal (was: SUSE port)
Previous Message Reinhard Max 2005-01-12 18:36:52 segfault caused by heimdal (was: SUSE port)

Browse pgsql-hackers by date

  From Date Subject
Next Message Reinhard Max 2005-01-12 19:11:32 Re: [HACKERS] segfault caused by heimdal (was: SUSE port)
Previous Message Merlin Moncure 2005-01-12 18:53:51 Re: Much Ado About COUNT(*)

Browse pgsql-patches by date

  From Date Subject
Next Message Reinhard Max 2005-01-12 19:11:32 Re: [HACKERS] segfault caused by heimdal (was: SUSE port)
Previous Message Reinhard Max 2005-01-12 18:36:52 segfault caused by heimdal (was: SUSE port)