Re: UNION ALL has higher cost than inheritance

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: UNION ALL has higher cost than inheritance
Date: 2010-10-21 13:57:42
Message-ID: 22347.1287669462@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com> writes:
> On Thu, Oct 21, 2010 at 2:18 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> The plan for UNION initially involves a couple of SubqueryScan nodes,
>> which impose an extra cost of cpu_tuple_cost per tuple. Those later
>> get optimized away, but we don't try to readjust the cost estimates
>> for that.

> Thanks. It also explains my another question why Merge Append cannot
> be used for UNION ALL plans.

Hmm, seems like the example you show ought to work. I wonder if there
was an oversight in that patch...

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-10-21 14:11:51 Re: pg_rawdump
Previous Message Marko Tiikkaja 2010-10-21 12:32:54 Re: Review: Fix snapshot taking inconsistencies