From: | "Richard Huxton" <dev(at)archonet(dot)com> |
---|---|
To: | "Richard Huxton" <dev(at)archonet(dot)com>, "Paul Mamin" <magamos(at)mail(dot)ru> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Postgres is too slow? |
Date: | 2001-06-22 11:26:15 |
Message-ID: | 002601c0fb0e$2cbef580$1001a8c0@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
From: "Richard Huxton" <dev(at)archonet(dot)com>
> Paul Mamin wrote:
> >
> > The SQL command I need to request:
> > ----------------------------------------------------------------
> > select numberid, sum(TarifDurationAir-CallDuration)/count(*)
> > from callbase
> > group by numberid;
> > ----------------------------------------------------------------
Made up some test data (3491 values of numberid, 140 entries for each).
Timings I'm getting on an old AMD-K6ii - 400Mhz w/256 MB (and a lot of
quiescent apps)
For your query: 54secs
By setting sort_mem to 8192 (8MB) I get a time of 49s but at the cost of a
much larger backend process.
Just doing:
SELECT numberid FROM callbase GROUP BY numberid;
Gives a timing of 34secs.
Disk activity is minimal - CPU is maxed out in user processing. I'd expect
your setup to be 10% faster at least.
HTH
- Richard Huxton
From | Date | Subject | |
---|---|---|---|
Next Message | Yasuo Ohgaki | 2001-06-22 11:33:11 | Re: Re[2]: Postgres is too slow? |
Previous Message | Yasuo Ohgaki | 2001-06-22 11:04:57 | Re: Re[2]: Postgres is too slow? |