pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomasz Myrta <jasiek@klaster.net>
To: pginfo <pginfo@t1.unisoftbg.com>
Cc: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: Re: Interest query plan
Date: Tue, 07 Oct 2003 18:17:56 +0200
Message-ID: <3F82E734.8060003@klaster.net> (raw)
In-Reply-To: <3F82D4FE.DD4E275B@t1.unisoftbg.com>
References: <3F82D4FE.DD4E275B@t1.unisoftbg.com>

> Hi all,
> I am running pg 7.3.1.
> My query is very simple but pg generates not the best possible plan for
> me:
>  analyze select * from a_doc D left outer join (A_SKLAD S join A_MED M
> ON(S.IDS_MED=M.IDS) )on( d.IDS=s.IDS_DOC)  where d.IDS='SOF_700060';
What about:

select * from a_doc D
  left join A_SKLAD S on(d.IDS=s.IDS_DOC)
  left join A_MED M ON(S.IDS_MED=M.IDS)
where d.IDS='SOF_700060'

?

Regards,
Tomasz Myrta





view thread (5+ messages)  latest in thread

Message-ID: <3F82E734.8060003@klaster.net>
Permalink:  ../3F82E734.8060003@klaster.net/
Also on:    postgresql.org/message-id/3F82E734.8060003@klaster.net

 · 

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: jasiek@klaster.net, pginfo@t1.unisoftbg.com
  Subject: Re: Interest query plan
  In-Reply-To: <3F82E734.8060003@klaster.net>

* 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