Re: [PERFORM] inheritance performance

2005-01-22 Thread Tom Lane
Greg Stark <[EMAIL PROTECTED]> writes: > ken <[EMAIL PROTECTED]> writes: >> From my understanding, all the data for these columns in all the child >> tables will be stored in this one parent table > No, all the data is stored in the child table. Correct ... >> and that, furthermore, there is a

Re: [PERFORM] inheritance performance

2005-01-21 Thread Greg Stark
Ioannis Theoharis <[EMAIL PROTECTED]> writes: > Can you explain me in more details what kind of optimization is missing in > that case? Uh, no I can't really. It was mentioned on the mailing list with regards to UNION ALL specifically. I think it applied to inherited tables as well but I wouldn't

Re: [PERFORM] inheritance performance

2005-01-21 Thread Ioannis Theoharis
On Fri, 21 Jan 2005, Greg Stark wrote: > There's also a slight performance hit because there's an optimization that the > planner does normally for simple queries that isn't currently done for either > UNION ALL or inherited tables. I think it's planned to fix that soon. Can you explain me in m

Re: [PERFORM] inheritance performance

2005-01-21 Thread Christopher Kings-Lynne
So if you perform a "select * from parent" then does postgres internally create a union between all the child tables and return you the results of that? Basically, yes. Kind of. Chris ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ

Re: [PERFORM] inheritance performance

2005-01-21 Thread Greg Stark
ken <[EMAIL PROTECTED]> writes: > On Fri, 2005-01-21 at 08:14, Greg Stark wrote: > > ken <[EMAIL PROTECTED]> writes: > > > > > >From my understanding, all the data for these columns in all the child > > > tables will be stored in this one parent table > > > > No, all the data is stored in the c

Re: [PERFORM] inheritance performance

2005-01-21 Thread ken
On Fri, 2005-01-21 at 08:14, Greg Stark wrote: > ken <[EMAIL PROTECTED]> writes: > > > >From my understanding, all the data for these columns in all the child > > tables will be stored in this one parent table > > No, all the data is stored in the child table. So if you perform a "select * from

Re: [PERFORM] inheritance performance

2005-01-21 Thread Greg Stark
ken <[EMAIL PROTECTED]> writes: > >From my understanding, all the data for these columns in all the child > tables will be stored in this one parent table No, all the data is stored in the child table. > and that, furthermore, there is a "hidden" column in the parent table called > tableoid th

[PERFORM] inheritance performance

2005-01-21 Thread ken
Wondering ... >From a performance standpoint, is it a bad idea to use inheritance simply as a tool for easy database building. That is for creating tables that share the same columns but otherwise are unrelated. For example, let's say I have the following set of columns that are common to many o