From: Andrew Sullivan <ajs@crankycanuck.ca>
To: pgsql-sql@postgresql.org
Subject: Re: Breaking up a query
Date: Sun, 13 Aug 2006 10:43:13 -0400
Message-ID: <20060813144312.GA16534@phlogiston.dyndns.org> (raw)
In-Reply-To: <C1013130.34CA7%saad.anis@comtechmobile.com>
References: <C1013130.34CA7%saad.anis@comtechmobile.com>
On Thu, Aug 10, 2006 at 06:53:33PM -0400, Saad Anis wrote:
> Hi Guys,
>
> A fellow at work has written the SQL below to retrieve some data from
> multiple tables. Obviously it is inefficient and unnecessarily complex, and
Why is that obvious? Why do you think that joining in your
application is going to give better performance than joining in the
database? This is what RDBMS _do_, for heaven's sake.
(I agree that your plan shows it's taking a long time. But that's a
different problem. We don't actually know what you want from your
query.)
A
--
Andrew Sullivan | ajs@crankycanuck.ca
I remember when computers were frustrating because they *did* exactly what
you told them to. That actually seems sort of quaint now.
--J.D. Baldwin
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: ajs@crankycanuck.ca
Subject: Re: Breaking up a query
In-Reply-To: <20060813144312.GA16534@phlogiston.dyndns.org>
* 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