pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: philb@vodafone.ie
To: pgsql-performance@postgresql.org
Cc: simon@2ndquadrant.com
Subject: Re: Query plan for very large number of joins
Date: Sat, 4 Jun 2005 11:04:10 +0100 (IST)
Message-ID: <774541.1117879450594.JavaMail.tomcat@iecsai19> (raw)

>> Despite being fairly restricted in scope,
>> the schema is highly denormalized hence the large number of tables.
>
>Do you mean normalized? Or do you mean you've pushed the superclass
>details down onto each of the leaf classes?

Sorry, I meant normalized, typing faster than I'm thinking here:) The schema 
was generated by hyperjaxb, a combination of Hibernate and JAXB. This allows 
one to go from XSD -> Object model -> Persistance in a single step. I'm 
just getting the hang of Hibernate so I don't know how flexible its' strategy 
is. Obviously though, the emphasis is on correctness first so while the 
same result could possibly be achieved more quickly with many smaller queries, 
it probably considers that it's up to the DBMS to handle optimisation (not 
unreasonably either I guess) 

Since the entire process from the XSD onwards is automated, there's no scope 
for tweaking either the OR mapping code or the DB schema itself except for 
isolated troubleshooting purposes. The XSD set in question is the UBL schema 
published by OASIS which has about 650 relations, I thought it would be 
nice to have this as a standard component in future development. 

Regards,
 -phil


>
>I guess I'm interested in what type of modelling led you to have so many
>tables in the first place?
>
>Gotta say, never seen 350 table join before in a real app.
>
>Wouldn't it be possible to smooth out the model and end up with less
>tables? Or simply break things up somewhere slightly down from the root
>of the class hierarchy?
>
>Best Regards, Simon Riggs


I'm using Vodafone Mail - to get your free mobile email account go to http://www.vodafone.ie
Use of Vodafone Mail is subject to Terms and Conditions  http://www.vodafone.ie/terms/website





view thread (11+ messages)

Message-ID: <774541.1117879450594.JavaMail.tomcat@iecsai19>
Permalink:  ../774541.1117879450594.JavaMail.tomcat@iecsai19/
Also on:    postgresql.org/message-id/774541.1117879450594.JavaMail.tomcat@iecsai19

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: philb@vodafone.ie, simon@2ndquadrant.com
  Subject: Re: Query plan for very large number of joins
  In-Reply-To: <774541.1117879450594.JavaMail.tomcat@iecsai19>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox