Ernst Bunders wrote:
> hello
> while doing some optimizations on hour database we ren into an
> interesting question. we are using postgres, and table inheritance works
> as such that when we have a query like people,insrel,articles and we
> have  relations like posrel and publishrel extending from insrel, all
> these tables are searched as well. I don't think this is the kind of
> behavour you want for relations. why search through posrel if we are
> looking for an insrel?
> With ordinary nodes it is different: if we have 'interview' extending
> from 'article' and we wat all articles, we indeed want all interviews as
> well.
> So it would seem that we don't want table inheritance on relations, and
> performance might in fact increase dramatically in large clouds if we
> could drop it. Am i wrong? Do tell..

I think we should perhaps not drop inheritance, because that makes
listing of related nodes withouth a specification of the 'role' work.

What we perhaps should do though, is that it should be possible that
if a role exists only on 'insrel', and that the database is postgresql
that it produces the right keyword in the sql-query to search only in that
table (I think it is 'ONLY' or so)? So, it would be a
postgresql-specific query-optimization.

For databases in which we only simulate inheritance (like mysql) this is
no issue.


Michiel


-- 
Michiel Meeuwissen                  mihxil'
Peperbus 111 MediaPark H'sum          [] ()
+31 (0)35 6772979         nl_NL eo_XX en_US



_______________________________________________
Developers mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/developers

Reply via email to