Just beware that inheritance is not a complete methodology in postgres.
The implementation has limitations. For instance, indexes in parent
tables will not be inherited by children.
I've yet to encounter a scenario that actually required inheritance.
I've used it a few times, but when I have, the end result always
required a bit more work because of the incomplete aspects of the
postgres implementation (namely constraints and indexes).
-tfo
On Sep 20, 2004, at 4:03 PM, jao@geophile.com wrote:
> My company's product uses Postgres 7.4.3. Postgres is working well for
> us, and we've worked through many performance issues by tweaking the
> schema, indexes, and posgresql.conf settings.
>
> Inheritance would be useful for our application, but we did not use
> this feature initially. We're about to revise part of our application,
> and this would be a good time to introduce inheritance -- it's a good
> fit for our data model, and it would greatly simplify some of our
> upcoming work.
>
> I'd really like to use inheritance, but not if I'm asking for trouble.
> The question is whether there are any performance-related surprises
> lurking. Our use of inheritance would be very simple:
>
> - The columns that would be inherited are not involved in any primary
> or foreign keys.
>
> - One of the columns would be used in indexes on some of the child
> tables. In these cases, the index would combine an inherited column
> with a column declared in an inheriting table.
>
> - Queries will often restrict the inherited indexed column.
>
> - We'll occasionally ORDER BY inherited columns.
>
> Any reason not to use inheritance?
>
> Jack Orenstein