pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Daniel Cristian Cruz <danielcristian@gmail.com>
To: Drew Wilson <drewmwilson@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Many to many join seems slow?
Date: Tue, 15 May 2007 13:00:29 -0300
Message-ID: <48d0cacb0705150900o29f11b42t5dc5634be50e496a@mail.gmail.com> (raw)
In-Reply-To: <49735678-25F5-48AA-B464-0864BAE56B55@gmail.com>
References: <49735678-25F5-48AA-B464-0864BAE56B55@gmail.com>

2007/5/15, Drew Wilson <drewmwilson@gmail.com>:
> =# explain SELECT s.source_id, s.value AS sourceValue, t.value AS
> translationValue
>        FROM
>            source s,
>            translation_pair tp,
>            translation t,
>            language l
>        WHERE
>            s.source_id = tp.source_id
>            AND tp.translation_id = t.translation_id
>            AND t.language_id = l.language_id
>            AND l.name = 'French' ;
>
>                                                           QUERY PLAN
> ------------------------------------------------------------------------
> -----------------------------------------------------
> Merge Join  (cost=524224.49..732216.29 rows=92447 width=97)

This way you get all word matches for the French language. Shouldn't
it be all matches for a specific word (s.value = 'word' in WHERE)?

-- 
Daniel Cristian Cruz



view thread (7+ messages)  latest in thread

Message-ID: <48d0cacb0705150900o29f11b42t5dc5634be50e496a@mail.gmail.com>
Permalink:  ../48d0cacb0705150900o29f11b42t5dc5634be50e496a@mail.gmail.com/
Also on:    postgresql.org/message-id/48d0cacb0705150900o29f11b42t5dc5634be50e496a@mail.gmail.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: danielcristian@gmail.com, drewmwilson@gmail.com
  Subject: Re: Many to many join seems slow?
  In-Reply-To: <48d0cacb0705150900o29f11b42t5dc5634be50e496a@mail.gmail.com>
  References: <49735678-25F5-48AA-B464-0864BAE56B55@gmail.com> <48d0cacb0705150900o29f11b42t5dc5634be50e496a@mail.gmail.com>

* 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