Re: [PERFORM] UNION and bad performance

2014-06-13 Thread pinker
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) -

Re: [PERFORM] UNION and bad performance

2014-06-08 Thread David G Johnston
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

Re: [PERFORM] UNION and bad performance

2010-12-20 Thread Robert Haas
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

Re: [PERFORM] UNION and bad performance

2010-12-12 Thread pasman pasmański
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

Re: [PERFORM] UNION and bad performance

2010-12-11 Thread Marc Mamin
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

Re: [PERFORM] UNION and bad performance

2010-12-11 Thread Andreas Kretschmer
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