Re: inheritance vs performance

From: Richard Huxton <dev(at)archonet(dot)com>
To: Pascal Polleunus <ppo(at)beeznest(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: inheritance vs performance
Date: 2004-02-13 09:57:33
Message-ID: 200402130957.33961.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Karsten Hilbert 2004-02-13 10:59:35 Re: inheritance vs performance
Previous Message CSN 2004-02-13 09:20:12 Re: update set x=(subquery on same table)