From: Simon Riggs <simon@2ndquadrant.com>
To: philb@vodafone.ie
Cc: pgsql-performance@postgresql.org
Subject: Re: Query plan for very large number of joins
Date: Sat, 04 Jun 2005 00:23:57 +0100
Message-ID: <1117841037.3844.1250.camel@localhost.localdomain> (raw)
In-Reply-To: <189960.1117801361979.JavaMail.tomcat@iecsai19>
References: <189960.1117801361979.JavaMail.tomcat@iecsai19>
On Fri, 2005-06-03 at 13:22 +0100, philb@vodafone.ie wrote:
>
> >>> I am using PostgreSQL (7.4) with a schema that was generated
> >>> automatically (using hibernate). The schema consists of about 650
> >>> relations. One particular query (also generated automatically)
> >>> consists of left joining approximately 350 tables.
> 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?
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
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: simon@2ndquadrant.com, philb@vodafone.ie
Subject: Re: Query plan for very large number of joins
In-Reply-To: <1117841037.3844.1250.camel@localhost.localdomain>
* 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