pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Drew Wilson <drewmwilson@gmail.com>
To: Daniel Cristian Cruz <danielcristian@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Many to many join seems slow?
Date: Tue, 15 May 2007 09:43:55 -0700
Message-ID: <694A96DF-65A7-4DCD-972F-97081A554E1B@gmail.com> (raw)
In-Reply-To: <48d0cacb0705150900o29f11b42t5dc5634be50e496a@mail.gmail.com>
References: <49735678-25F5-48AA-B464-0864BAE56B55@gmail.com>
	<48d0cacb0705150900o29f11b42t5dc5634be50e496a@mail.gmail.com>

Yes, I'll be filtering by string value. However, I just wanted to see  
how long it takes to scan all translations in a particular language.

Drew

On May 15, 2007, at 9:00 AM, Daniel Cristian Cruz wrote:

> 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: <694A96DF-65A7-4DCD-972F-97081A554E1B@gmail.com>
Permalink:  ../694A96DF-65A7-4DCD-972F-97081A554E1B@gmail.com/
Also on:    postgresql.org/message-id/694A96DF-65A7-4DCD-972F-97081A554E1B@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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: drewmwilson@gmail.com, danielcristian@gmail.com
  Subject: Re: Many to many join seems slow?
  In-Reply-To: <694A96DF-65A7-4DCD-972F-97081A554E1B@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