From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Zintrigue <zintrigue(at)gmail(dot)com> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: noob inheritance question |
Date: | 2010-01-07 20:19:57 |
Message-ID: | 603c8f071001071219n423913b6l435e6c227c831333@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Wed, Jan 6, 2010 at 6:53 PM, Zintrigue <zintrigue(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | marcin mank | 2010-01-07 21:05:14 | Re: Massive table (500M rows) update nightmare |
Previous Message | Robert Haas | 2010-01-07 20:16:39 | Re: query looping? |