Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 495F79FB978 for ; Tue, 15 May 2007 11:17:38 -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 39195-09 for ; Tue, 15 May 2007 11:17:28 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.181]) by postgresql.org (Postfix) with ESMTP id B42B29FB926 for ; Tue, 15 May 2007 11:17:34 -0300 (ADT) Received: by py-out-1112.google.com with SMTP id a73so133417pye for ; Tue, 15 May 2007 07:17:33 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=DdxgmOyPy4le4DLDKR2qGIcl89JCLcAJ+zwZCoKpTAAk+9xAPSUnzA0AkfobzefQtRcQZ16VDXB+nXmOWFgBwDdtmWkeLgsebt4orDRgH29AAevqqLmDSomb1m9S9z1L+9V4f2LjmhMnRJZCC0J4KLw4ja1fxI9Ko/BRimI64co= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=Tjng0/k1nCCIucW7hMsmZfV3ReTHRDnJHOX/nJFNi7TVBPBlz+ALsduCQyrXJxY+dRlJCOCR9nS7BobZLkuz83stpSDduyVD5NskcfJzeoTNbGtpkeEfqddQUAcJ5U0xM+jDRiMnTTyitf8Ci58k8eA47STZpnx3NuUIFDPMyKg= Received: by 10.64.131.4 with SMTP id e4mr891712qbd.1179238653135; Tue, 15 May 2007 07:17:33 -0700 (PDT) Received: from ?172.24.32.112? ( [62.232.55.118]) by mx.google.com with ESMTP id f12sm584799qba.2007.05.15.07.17.30; Tue, 15 May 2007 07:17:31 -0700 (PDT) Message-ID: <4649C0F3.2070300@enterprisedb.com> Date: Tue, 15 May 2007 15:17:23 +0100 From: Heikki Linnakangas User-Agent: Icedove 1.5.0.10 (X11/20070329) MIME-Version: 1.0 To: Drew Wilson CC: Alvaro Herrera , pgsql-performance@postgresql.org Subject: Re: Many to many join seems slow? References: <49735678-25F5-48AA-B464-0864BAE56B55@gmail.com> <20070515140505.GF6298@alvh.no-ip.org> <2FD25590-AAE3-47AE-9E75-42D1361C38E2@gmail.com> In-Reply-To: <2FD25590-AAE3-47AE-9E75-42D1361C38E2@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/267 X-Sequence-Number: 24657 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