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

[PERFORM] UNION and bad performance

2010-12-11 Thread Olivier Pala
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

Re: [PERFORM] UNION and bad performance

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

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