Re: INHERITS doesn't offer enough functionality

From: Chris <chris(at)bitmead(dot)com>
To: marten(at)toppoint(dot)de
Cc: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>, Oliver Elphick <olly(at)lfix(dot)co(dot)uk>, Alfred Perlstein <bright(at)wintelcom(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: INHERITS doesn't offer enough functionality
Date: 2000-10-20 07:35:41
Message-ID: 39EFF5CD.149CC7C8@bitmead.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> The point is: this is classic, but noone does it
> like this if your really have a larger hierarchy of
> classes. You'll not get any good performance, when
> solving an association in your oo
> program, because the framework has to query against
> each table: 6 tables - 6 queries !!! :-(((((
>
> With the PostgreSQL approach one can send ONE query
> against the tables and one would get one result ...
> which will be much faster (I hope so ... that has to
> be prooved ..).=

You'll still have to do 6 queries in postgres because it does not return
fields in sub-classes. Imagine the root of the hierarchy is abstract
with no fields. You query this class and you get 100 tuples with no
columns! This is the aspect I'm hoping to fix but I'm waiting for Tom to
re-do the query data structures before I do changes that are thrown
away.

> Actually one should think about: why do I really want to
> have inheritance in the oo-rdbms ? Actually I could put
> all columns (of all classes in this hierarchy into one table
> and that's it).

Ouch. That way lies madness.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zeugswetter Andreas SB 2000-10-20 08:52:22 AW: AW: Backup, restore & pg_dump
Previous Message Philip Warner 2000-10-20 05:07:08 Re: Problems with the latest CVS.