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
Hello,
UNION will remove all duplicates, so that the result additionally
requires to be sorted.
Anyway, for performance issues, you should always start investigation
with explain analyze .
regards,
Marc Mamin
From: pgsql-performance-ow...@postgresql.org
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