Skip site navigation (1) Skip section navigation (2)

Re: About inheritance

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ioannis Theoharis <theohari(at)ics(dot)forth(dot)gr>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: About inheritance
Date: 2004-08-22 17:37:29
Message-ID: 6211.1093196249@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-general
Ioannis Theoharis <theohari(at)ics(dot)forth(dot)gr> writes:
> I expekt to find the same plans because in both cases there is a union to
> be done, but i see that in second case there is an additional call to a
> routine. I meen the 'Subquery Scan "*SELECT* X"'

The subquery scan step is in there because in a UNION construct, there
may be a need to do transformations on the data before it can be
unioned.  For instance you are allowed to UNION an int4 and an int8
column, in which case the int4 values have to be promoted to int8 after
they come out of the subplan.

In the particular case you are showing, the subquery scan steps aren't
really doing anything, but AFAIR the planner does not bother to optimize
them out.  I'd be pretty surprised if they chew up any meaningful amount
of runtime.

			regards, tom lane

In response to

Responses

pgsql-general by date

Next:From: Thomas HallgrenDate: 2004-08-22 17:52:10
Subject: Re: Unsupported 3rd-party solutions (Was: Few questions
Previous:From: Mike NolanDate: 2004-08-22 17:35:20
Subject: Re: Greatest/Least functions?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group