Re: Performance Issues

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Shaun Grannis <shaun_grannis(at)hotmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Performance Issues
Date: 2002-04-25 16:23:06
Message-ID: 20020425162306.GA24619@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Apr 23, 2002 at 02:16:46PM -0500,
Shaun Grannis <shaun_grannis(at)hotmail(dot)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 with a 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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrey 2002-04-25 16:23:10 Re: How to deal with crashes?
Previous Message Masaru Sugawara 2002-04-25 15:57:04 Re: group by with multiple selects having different where conditions