pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: pinker <pinker@onet.eu>
To: pgsql-performance@postgresql.org
Subject: Re: UNION and bad performance
Date: Sun, 8 Jun 2014 06:58:55 -0700 (PDT)
Message-ID: <1402235935505-5806445.post@n5.nabble.com> (raw)
In-Reply-To: <AANLkTinC0ZcS1N54T-jmpj3VPWVnW15apmWVCKucgnD0@mail.gmail.com>
References: <4D00B4DE.3030508@xgs-france.com>
	<AANLkTikoRUG9qJv0wZVq-n_RKDX0kOqve3PTKjPwc_MZ@mail.gmail.com>
	<AANLkTinC0ZcS1N54T-jmpj3VPWVnW15apmWVCKucgnD0@mail.gmail.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

>> 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)
>>   ->  Append  (cost=0.00..40.00 rows=2000 width=4)


Why in this case the estimated number of rows is 2000? Is it standard
planner behavior?





--
View this message in context: http://postgresql.1045698.n5.nabble.com/UNION-and-bad-performance-tp3301375p5806445.html
Sent from the PostgreSQL - performance mailing list archive at Nabble.com.


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



view thread (7+ messages)  latest in thread

Message-ID: <1402235935505-5806445.post@n5.nabble.com>
Permalink:  ../1402235935505-5806445.post@n5.nabble.com/
Also on:    postgresql.org/message-id/1402235935505-5806445.post@n5.nabble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: pinker@onet.eu
  Subject: Re: UNION and bad performance
  In-Reply-To: <1402235935505-5806445.post@n5.nabble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox