Re: Lifting WHERE conditions out of inner select - Mailing list pgsql-general

From Richard Broersma Jr
Subject Re: Lifting WHERE conditions out of inner select
Date
Msg-id 94231.54546.qm@web31810.mail.mud.yahoo.com
Whole thread Raw
In response to Lifting WHERE conditions out of inner select  ("John D. Burger" <john@mitre.org>)
Responses Re: Lifting WHERE conditions out of inner select
List pgsql-general
--- "John D. Burger" <john@mitre.org> wrote:
> My question is, should the planner have figured this out, and we're
> just losing out because we're stuck in 7.4?  Or is there some subtle
> difference in semantics I'm missing?  The select results were the
> same in both cases, but I'm willing to believe that's an accident of
> our data.

I don't know if this helps.

    SELECT lemma
      FROM word AS W
INNER JOIN sense AS S
        ON W.wordid = S.wordid
INNER JOIN semlinkref AS R
        ON R.synset1id = S.synsetid
       AND R.synset2id = S.synsetid
INNER JOIN synset AS T
        ON S1.synsetid = T.synsetid
     WHERE W.lemma = 'scramble'
       AND R.linked = 1
       AND R.pos='v'
  ORDER BY lemma;

Regards,
Richard Broersma Jr.

pgsql-general by date:

Previous
From: "John D. Burger"
Date:
Subject: Lifting WHERE conditions out of inner select
Next
From: Richard Broersma Jr
Date:
Subject: Re: Lifting WHERE conditions out of inner select