pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Larry Rosenman <ler@lerctr.org>
To: Michael Glaesemann <grzm@myrealbox.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Query issue/8.0.1/Serendipity
Date: Tue, 8 Mar 2005 06:28:38 -0600
Message-ID: <200503080628.39117.ler@lerctr.org> (raw)
In-Reply-To: <a5c61556de7ac42a8e84e857dcff3988@myrealbox.com>
References: <200503080548.17179.ler@lerctr.org>
	<a5c61556de7ac42a8e84e857dcff3988@myrealbox.com>

On Tuesday 08 March 2005 06:21 am, Michael Glaesemann wrote:
> Larry,
>
> Restating your SQL in a more reader-friendly form:
[snip]
>
This is from an error page (and machine generated to boot :) ) 

> I can see you're using a lot of left joins. You are beginning your left
> joins off of ec, so I believe neither e nor c can be referenced as join
> conditions. It might work if you reorder the first part of the FROM
> clause as the following:
>
> FROM serendipity_category c
>      , serendipity_entrycat ec
>      , serendipity_entries e
> LEFT OUTER JOIN serendipity_entryproperties ep_cache_extended
>
> (Thugh I can't be sure without seeing table definitions.)
a pg_dump -s is at:

http://www.lerctr.org/~ler/s9y.sql


>
> It also appears you have a redundant e.timestamp constraint in the
> WHERE clause: if e.timestamp is >= 1110241185 it's definitely going to
> be <= 1112335200
this query is machine generated, so I'm sure it's based on timestamps.

>
> Hope this helps. I find white space helps me read my own SQL much more
> easily.

understood, as I said, it's machine generated :) 

>
> Michael Glaesemann
> grzm myrealbox com

-- 
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 214-351-4152                 E-Mail: ler@lerctr.org
US Mail: 3535 Gaspar Drive, Dallas, TX 75220-3611



view thread (12+ messages)  latest in thread

Message-ID: <200503080628.39117.ler@lerctr.org>
Permalink:  ../200503080628.39117.ler@lerctr.org/
Also on:    postgresql.org/message-id/200503080628.39117.ler@lerctr.org

 · 

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-sql@postgresql.org
  Cc: ler@lerctr.org, grzm@myrealbox.com
  Subject: Re: Query issue/8.0.1/Serendipity
  In-Reply-To: <200503080628.39117.ler@lerctr.org>

* 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