Re: Breaking up a query - Mailing list pgsql-sql

From Andrew Sullivan
Subject Re: Breaking up a query
Date
Msg-id 20060813144312.GA16534@phlogiston.dyndns.org
Whole thread Raw
In response to Breaking up a query  (Saad Anis <saad.anis@comtechmobile.com>)
List pgsql-sql
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


pgsql-sql by date:

Previous
From: "Aaron Bono"
Date:
Subject: Re: Breaking up a query
Next
From: Kyle Bateman
Date:
Subject: Using bitmap index scans-more efficient