Re: Lifting WHERE conditions out of inner select

From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>, "John D(dot) Burger" <john(at)mitre(dot)org>, PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Lifting WHERE conditions out of inner select
Date: 2007-10-08 20:16:31
Message-ID: 519702.62747.qm@web31805.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

OOPs!
--- Richard Broersma Jr <rabroersma(at)yahoo(dot)com> wrote:

> --- "John D. Burger" <john(at)mitre(dot)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 S.synsetid = T.synsetid
> WHERE W.lemma = 'scramble'
> AND R.linked = 1
> AND T.pos='v'
> ORDER BY lemma;
>
> Regards,
> Richard Broersma Jr.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Josh Tolley 2007-10-08 20:21:51 Re: Partitioned tables, rules, triggers
Previous Message Richard Broersma Jr 2007-10-08 20:09:29 Re: Lifting WHERE conditions out of inner select