Re: noob inheritance question - Mailing list pgsql-performance

From Robert Haas
Subject Re: noob inheritance question
Date
Msg-id 603c8f071001071219n423913b6l435e6c227c831333@mail.gmail.com
Whole thread Raw
In response to noob inheritance question  (Zintrigue <zintrigue@gmail.com>)
List pgsql-performance
On Wed, Jan 6, 2010 at 6:53 PM, Zintrigue <zintrigue@gmail.com> wrote:
> I'm wondering if there's any performance penalty here

There definitely is.  Your design sounds pretty painful to me...
adding a column referencing a side-table will be much nicer.

> If anyone can offer in any insight as too how inheritance is actually
> executed (compared to JOINs especially), I'd be most grateful.

You can look at the query plans for your queries using EXPLAIN.
Inheritance is really just UNION ALL under the covers - it's meant for
partitioning, not the sort of thing you're trying to do here, so your
query plans will probably not be too good with this design.

...Robert

pgsql-performance by date:

Previous
From: Robert Haas
Date:
Subject: Re: query looping?
Next
From: marcin mank
Date:
Subject: Re: Massive table (500M rows) update nightmare