Re: [PERFORM] SLOW query with aggregates

2004-03-23 Thread Greg Stark
"A Palmblad" <[EMAIL PROTECTED]> writes: > GroupAggregate (cost=0.00..338300.34 rows=884 width=345) (actual > time=86943.272..382718.104 rows=3117 loops=1) >-> Merge Join (cost=0.00..93642.52 rows=1135610 width=345) (actual > time=0.148..24006.748 rows=1120974 loops=1) I think the reason

[PERFORM] SLOW query with aggregates

2004-03-23 Thread A Palmblad
I am trying to optimize a query that does a lot of aggregation. I have a large number of columns that are part of the result, and most are aggregates. They are acting on two temporary tables, the largest of which should have at most 1 million tuples, and the smaller around 5000; the the smaller t

Re: [PERFORM] SLOW query with aggregates

2004-03-23 Thread Tom Lane
"A Palmblad" <[EMAIL PROTECTED]> writes: > GroupAggregate (cost=0.00..338300.34 rows=884 width=345) (actual > time=86943.272..382718.104 rows=3117 loops=1) >-> Merge Join (cost=0.00..93642.52 rows=1135610 width=345) (actual > time=0.148..24006.748 rows=1120974 loops=1) You do not have a pl