Re: Interest query plan

From: Tomasz Myrta <jasiek(at)klaster(dot)net>
To: pginfo <pginfo(at)t1(dot)unisoftbg(dot)com>
Cc: "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Interest query plan
Date: 2003-10-07 16:17:56
Message-ID: 3F82E734.8060003@klaster.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> 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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tomasz Myrta 2003-10-07 17:11:36 Re: Interest query plan
Previous Message pginfo 2003-10-07 15:36:51 Re: Interest query plan