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

From Scott Marlowe
Subject Re: What constitutes a complex query
Date
Msg-id dcc563d10805060941i2621d4fdv195b9052afdc953b@mail.gmail.com
Whole thread Raw
In response to What constitutes a complex query  (Justin <justin@emproshunts.com>)
Responses Re: What constitutes a complex query
List pgsql-performance
On Tue, May 6, 2008 at 9:45 AM, Justin <justin@emproshunts.com> wrote:
> This falls under the stupid question and i'm just curious what other people
> think what makes a query complex?

Well, as mentioned, there's two kinds.  some that look big and ugly
are actually just shovelling data with no fancy interactions between
sets.  Some reporting queries are like this.  I've made simple
reporting queries that took up many pages that were really simple in
nature and fast on even older pgsql versions (7.2-7.4)

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.

pgsql-performance by date:

Previous
From: PFC
Date:
Subject: Re: need to speed up query
Next
From: Antoine Baudoux
Date:
Subject: Re: multiple joins + Order by + LIMIT query performance issue