rhaas=# explain select a from generate_series(1,100) a union select a
from generate_series(1,100) a;
QUERY PLAN
--
HashAggregate (cost=45.00..65.00 rows=2000 width=4)
-
pinker wrote
rhaas=# explain select a from generate_series(1,100) a union select a
from generate_series(1,100) a;
QUERY PLAN
--
HashAggregate (cost=45.00..65.00 rows=2000
2010/12/12 pasman pasmański pasma...@gmail.com:
UNION will remove all duplicates, so that the result additionally requires to
be sorted.
Right, to avoid the SORT and UNIQUE - operation you can use UNION ALL
by the way maybe apply hashing to calculate UNION be better ?
The planner already
UNION will remove all duplicates, so that the result additionally requires to
be sorted.
Right, to avoid the SORT and UNIQUE - operation you can use UNION ALL
by the way maybe apply hashing to calculate UNION be better ?
pasman
--
Sent via pgsql-performance mailing list
Hi,
I have a performance trouble with UNION query
First I have this view :
SELECT a,b,c FROM table1, table2 WHERE jointure AND condition
Result : 150 000 records in 1~2 s
Then, I adding an UNION into the same view :
SELECT a,b,c FROM table1, table2 WHERE jointure AND
...@postgresql.org] On Behalf Of Olivier
Pala
Sent: Donnerstag, 9. Dezember 2010 11:52
To: pgsql-performance@postgresql.org
Cc: Olivier Pala
Subject: [PERFORM] UNION and bad performance
Hi,
I have a performance trouble with UNION query
First I have this view :
SELECT a,b,c FROM table1
Marc Mamin m.ma...@intershop.de wrote:
Hello,
UNION will remove all duplicates, so that the result additionally requires to
be sorted.
Right, to avoid the SORT and UNIQUE - operation you can use UNION ALL
Anyway, for performance issues, you should always start investigation with