Re: inheritance vs performance - Mailing list pgsql-general

From Richard Huxton
Subject Re: inheritance vs performance
Date
Msg-id 200402130957.33961.dev@archonet.com
Whole thread Raw
In response to inheritance vs performance  (Pascal Polleunus <ppo@beeznest.net>)
Responses Re: inheritance vs performance  (Karsten Hilbert <Karsten.Hilbert@gmx.net>)
List pgsql-general
On Friday 13 February 2004 09:01, Pascal Polleunus wrote:
> Hi,
>
> I'm wondering if there could be problems related to inheritance in the
> following scenario (with PostgreSQL 7.4.1)...
>
> 1 A-table, abstract.
>
> Max 10 B-tables that inherit from A, with sometimes some more columns
> than A. These are also abstracts.
>
> "n" C-tables that inherit from 1 B-table, without more columns.
> Each C-table could contain quite a lot of rows (500K, 1M, ...).

What is the point of having multiple C tables with the same structure?

> Could there be problems, or performance issues, related to inheritance
> if there is "too much" C-tables (in combination with the number of
> rows)? And what would be that "too much"?

Well, thousands of tables is probably "too much", but a hundred tables or two
in a database shouldn't cause problems. Don't see why you'd want them though.

> Remarks:
> A-table could be removed as it's not that important/relevant.
> The purpose of this structure is not to be able to easily select through
> the parent in all children tables, though it would be appreciated.
> The purpose of this is just to be able to easily create C-tables, and
> maybe also to easily handle structure changes of A or B-tables.

I don't see how inheritance makes it easier to create C tables.

> The master words here are "performance" and "reliability".

Don't see how either of these are affected by what you're talking about doing
here. Can you explain more closely what it is you're trying to do?

--
  Richard Huxton
  Archonet Ltd

pgsql-general by date:

Previous
From: CSN
Date:
Subject: Re: update set x=(subquery on same table)
Next
From: Karsten Hilbert
Date:
Subject: Re: inheritance vs performance