From: Hervé Piedvache <herve@elma.fr>
To: pgsql-sql@postgresql.org
Subject: Timing trouble with GROUP BY PostgreSQL / Oracle ?
Date: Mon, 06 Nov 2000 18:51:50 +0100
Message-ID: <3A06EFB6.14BF8E19@elma.fr> (raw)
Hi,
I would like to know if someone have a solution for me ...
I have a table with today about 2,8 millions records.
The table have good indexes, in our case on idcond, and points !
When I do :
select sum(points) from gains;
With Oracle : 8 sec
With PostGreSQL : 10 sec
OK for this it's ok ...
But when I do :
select sum(points) from gains group by idcond;
With Oracle : 22 sec
With PostGreSQL : about 3 minutes !!!
I have done a vacuum analyse of the table gains ... just before testing
...
What can I do to optimize that result ?
Why the group by function is so slow ??
Thanks for your help !
Regards,
--
Hervé Piedvache
Elma Ingenierie Informatique
6, rue du Faubourg Saint-Honoré
F-75008 - Paris - France
http://www.elma.fr
Tel: +33-1-44949901
Fax: +33-1-44949902
Email: herve@elma.fr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: herve@elma.fr
Subject: Re: Timing trouble with GROUP BY PostgreSQL / Oracle ?
In-Reply-To: <3A06EFB6.14BF8E19@elma.fr>
References: <3A06EFB6.14BF8E19@elma.fr>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox