Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 98F1A9FBAB3 for ; Tue, 15 May 2007 13:45:21 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 85549-02-5 for ; Tue, 15 May 2007 13:45:16 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.234]) by postgresql.org (Postfix) with ESMTP id 3E31F9FBCD5 for ; Tue, 15 May 2007 13:45:17 -0300 (ADT) Received: by wx-out-0506.google.com with SMTP id i28so1880507wxd for ; Tue, 15 May 2007 09:45:16 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; b=Tur/mnFQnpQMFc+i8TqMOXq+U/pHS5dG1Avj0QMGK7v7EBOpbaUsv8AGNyaXPxtmdsj7hyc7rEshsqdcYDgrr4Nmsw4pMV/UkAta8rZddTfMEelvKWRVef6Is05gnG7wTA84Y2/56ZhXmUcFCXc6LXobr/mD0LYJvQXjRZZE6C4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; b=HKznlibHpwFm4KkD1q68m+E/i39Ig9ivuSQWGU4agAjBaUK5RVBzyrPL0NEXDT0PVkbUDNnf5cJcSAlRTOha6xHrHDt7WKee8LB7w6nnoyYaF7x0FTyB9tijggIUftF2rBSGcJeB5/WWe5ZunBzv4qRjsATg/OsMBQzBO1GJlTs= Received: by 10.90.56.5 with SMTP id e5mr6425759aga.1179247516400; Tue, 15 May 2007 09:45:16 -0700 (PDT) Received: from ?17.203.35.206? ( [17.203.35.206]) by mx.google.com with ESMTP id 38sm17197166aga.2007.05.15.09.45.14; Tue, 15 May 2007 09:45:15 -0700 (PDT) In-Reply-To: <4649C0F3.2070300@enterprisedb.com> References: <49735678-25F5-48AA-B464-0864BAE56B55@gmail.com> <20070515140505.GF6298@alvh.no-ip.org> <2FD25590-AAE3-47AE-9E75-42D1361C38E2@gmail.com> <4649C0F3.2070300@enterprisedb.com> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Cc: Alvaro Herrera , pgsql-performance@postgresql.org Content-Transfer-Encoding: 7bit From: Drew Wilson Subject: Re: Many to many join seems slow? Date: Tue, 15 May 2007 09:45:07 -0700 To: Heikki Linnakangas X-Mailer: Apple Mail (2.752.3) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/273 X-Sequence-Number: 24663 You're right. If I redirect output to /dev/null, the query completes in 1.4s. # \o /dev/null # SELECT s.source_id, s.value as sourceValue, t.value as translationValue... ... Time: 1409.557 ms # That'll do for now. Thanks, Drew On May 15, 2007, at 7:17 AM, Heikki Linnakangas wrote: > Drew Wilson wrote: >> Merge Join (cost=524224.49..732216.29 rows=92447 width=97) >> (actual time=1088.871..1351.840 rows=170759 loops=1) >> ... >> Total runtime: 1366.757 ms > > It looks like the query actual runs in less than 3 seconds, but it > takes some time to fetch 170759 rows to the client. > > -- > Heikki Linnakangas > EnterpriseDB http://www.enterprisedb.com