> But when I do :
> select sum(points) from gains group by idcond;
>
> With Oracle : 22 sec
> With PostGreSQL : about 3 minutes !!!
Try
select sum(points) from gains where idcond >= _minimum_id_cond_value_
group by idcond;
to see if forced index usage will help. Unfortunately, PG will anyway
try to sort result before grouping, but probably this trick will help
somehow. Also, use -S 2048 (or more) backend arg to increase sort
memory size.
Vadim