Re: Breaking up a query

From: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Breaking up a query
Date: 2006-08-13 14:43:13
Message-ID: 20060813144312.GA16534@phlogiston.dyndns.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)crankycanuck(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Kyle Bateman 2006-08-13 17:46:42 Using bitmap index scans-more efficient
Previous Message Aaron Bono 2006-08-12 16:22:16 Re: Breaking up a query