Any reason not to use inheritance?

From: jao(at)geophile(dot)com
To: pgsql-general(at)postgresql(dot)org
Subject: Any reason not to use inheritance?
Date: 2004-09-20 21:03:50
Message-ID: 1095714229.414f45b60340b@geophile.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron St-Pierre 2004-09-20 21:04:29 Re: using database for queuing operations?
Previous Message Stephan Szabo 2004-09-20 21:02:22 Re: unique constraints on foreign keys