Re: Performance Issues - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: Performance Issues
Date
Msg-id 20020425162306.GA24619@wolff.to
Whole thread Raw
In response to Performance Issues  ("Shaun Grannis" <shaun_grannis@hotmail.com>)
List pgsql-general
On Tue, Apr 23, 2002 at 02:16:46PM -0500,
  Shaun Grannis <shaun_grannis@hotmail.com> wrote:
> Hi,
>
>
>
> I've found some performance issues with Postgres that I'm hoping people on this list can help resolve.  We're working
witha 65 million record table that includes year of birth (data type INT). To count the frequency of dates in the
table,it takes 2 hours 26 minutes to execute. (There's an approximately 100-year range of dates in the 65 million
records).

I believe that issue is the postgres doesn't know how many different values
to expect, so that rather than set up buckets and add one to the appropiate
bucket when you encouter a value (which is what your perl script does),
it sorts all of the like values together and counts them up one group at
a time. The sort is probably what is killing your performance.

There has been some discussion on this topic on one of the postgres
lists in the last couple of days.

pgsql-general by date:

Previous
From: Masaru Sugawara
Date:
Subject: Re: group by with multiple selects having different where conditions
Next
From: Lincoln Yeoh
Date:
Subject: Strange vacuum error Was: No long-lived transaction, still can't delete tuples