From: Richard Broersma <richard.broersma@gmail.com>
To: Scott Marlowe <scott.marlowe@gmail.com>
Cc: Justin <justin@emproshunts.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: What constitutes a complex query
Date: Tue, 6 May 2008 09:58:39 -0700
Message-ID: <396486430805060958x31dd63ffu994493f68d8e828f@mail.gmail.com> (raw)
In-Reply-To: <dcc563d10805060941i2621d4fdv195b9052afdc953b@mail.gmail.com>
References: <48207D26.7050201@emproshunts.com>
<dcc563d10805060941i2621d4fdv195b9052afdc953b@mail.gmail.com>
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
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: richard.broersma@gmail.com, scott.marlowe@gmail.com, justin@emproshunts.com
Subject: Re: What constitutes a complex query
In-Reply-To: <396486430805060958x31dd63ffu994493f68d8e828f@mail.gmail.com>
References: <48207D26.7050201@emproshunts.com> <dcc563d10805060941i2621d4fdv195b9052afdc953b@mail.gmail.com> <396486430805060958x31dd63ffu994493f68d8e828f@mail.gmail.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