From: | "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com> |
---|---|
To: | Justin <justin(at)emproshunts(dot)com> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: What constitutes a complex query |
Date: | 2008-05-06 16:41:40 |
Message-ID: | dcc563d10805060941i2621d4fdv195b9052afdc953b@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Tue, May 6, 2008 at 9:45 AM, Justin <justin(at)emproshunts(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Antoine Baudoux | 2008-05-06 16:42:34 | Re: multiple joins + Order by + LIMIT query performance issue |
Previous Message | PFC | 2008-05-06 16:35:16 | Re: need to speed up query |