Re: What constitutes a complex query - Mailing list pgsql-performance

From Richard Broersma
Subject Re: What constitutes a complex query
Date
Msg-id 396486430805060958x31dd63ffu994493f68d8e828f@mail.gmail.com
Whole thread Raw
In response to Re: What constitutes a complex query  ("Scott Marlowe" <scott.marlowe@gmail.com>)
List pgsql-performance
On Tue, May 6, 2008 at 9:41 AM, Scott Marlowe <scott.marlowe@gmail.com> wrote:
> I'd say that the use of correlated subqueries qualifies a query as
> complicated.  Joining on non-usual pk-fk stuff.  the more you're
> mashing one set of data against another, and the odder the way you
> have to do it, the more complex the query becomes.

I would add that data analysis queries that have multiple level of
aggregation analysis can be complicated also.

For example, in a table of racer times find the average time for each
team while only counting teams whom at least have greater than four
team members and produce an ordered list displaying the ranking for
each team according to their average time.


--
Regards,
Richard Broersma Jr.

Visit the Los Angles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug

pgsql-performance by date:

Previous
From: Steve Atkins
Date:
Subject: Re: What constitutes a complex query
Next
From: Dennis Muhlestein
Date:
Subject: Possible Redundancy/Performance Solution