From: | Hervé Piedvache <herve(at)elma(dot)fr> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Really SLOW using GROUP BY ...!? |
Date: | 2000-11-08 20:55:31 |
Message-ID: | 3A09BDC3.853E9EEC@elma.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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é
From | Date | Subject | |
---|---|---|---|
Next Message | Mikheev, Vadim | 2000-11-08 20:58:13 | RE: Really SLOW using GROUP BY ...!? |
Previous Message | Bruce Momjian | 2000-11-08 20:39:07 | Re: VACUUM AND VACUUM ANALYSE |