pg.ddx.io pgsql-sql@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: Frank Jördens <frank@woome.com>
Cc: pgsql-sql@postgresql.org, Nic Ferrier <nferrier@woome.com>
Cc: Edward George <ed@woome.com>
Cc: Seb Potter <seb@woome.com>
Cc: Hannu Krosing <hannu@2ndquadrant.com>
Subject: Re: Make the planner smarter about idiosyncratic (or broken) ORM behaviour
Date: Fri, 22 May 2009 10:56:49 +0100
Message-ID: <4A1676E1.6010102@archonet.com> (raw)
In-Reply-To: <7d10d2df0905220233v3e54ab34lb9c3530fe3543a5c@mail.gmail.com>
References: <7d10d2df0905220233v3e54ab34lb9c3530fe3543a5c@mail.gmail.com>
Frank Jördens wrote:
> Our Django experts are telling me that it is probably not practical to
> fix in the ORM, as it seems to be structural (anyway not fixable for
> us in the near term). Hence I am wondering if anyone has an idea as to
> how to make the planner smarter about such weirdness (or brokenness);
> you might argue that the 2nd join there is merely syntactic bloat
> which the planner might just recognize as such?
Even if you have funding to hire a developer to adapt PG's planner, it's
going to be an uphill struggle to get patches accepted unless there is a
simple, quick can-merge-two-joins test someone can come up with. Time
spent planning to deal with badly written queries costs every
well-written query too of course.
Even with a patch and acceptance from core, 8.4 is in beta at the moment
so you'll have a long wait before 8.5 comes out with your patch.
Are you sure it wouldn't be easier to hire a Python guru for a couple of
days and have him/her hack the ORM to make it less, um, "simplistic"?
There must be an "assemble references into JOINs" point in the code you
could rationalise this at.
--
Richard Huxton
Archonet Ltd
view thread (4+ messages) latest in thread
Message-ID: <4A1676E1.6010102@archonet.com> Permalink: ../4A1676E1.6010102@archonet.com/ Also on: postgresql.org/message-id/4A1676E1.6010102@archonet.com ·
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-sql@postgresql.org Cc: dev@archonet.com, frank@woome.com, nferrier@woome.com, ed@woome.com, seb@woome.com, hannu@2ndquadrant.com Subject: Re: Make the planner smarter about idiosyncratic (or broken) ORM behaviour In-Reply-To: <4A1676E1.6010102@archonet.com> * 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