pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Marlowe <scott.marlowe@gmail.com>
To: Justin <justin@emproshunts.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: What constitutes a complex query
Date: Tue, 6 May 2008 10:41:40 -0600
Message-ID: <dcc563d10805060941i2621d4fdv195b9052afdc953b@mail.gmail.com> (raw)
In-Reply-To: <48207D26.7050201@emproshunts.com>
References: <48207D26.7050201@emproshunts.com>

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.



view thread (7+ messages)  latest in thread

Message-ID: <dcc563d10805060941i2621d4fdv195b9052afdc953b@mail.gmail.com>
Permalink:  ../dcc563d10805060941i2621d4fdv195b9052afdc953b@mail.gmail.com/
Also on:    postgresql.org/message-id/dcc563d10805060941i2621d4fdv195b9052afdc953b@mail.gmail.com

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: scott.marlowe@gmail.com, justin@emproshunts.com
  Subject: Re: What constitutes a complex query
  In-Reply-To: <dcc563d10805060941i2621d4fdv195b9052afdc953b@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