Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id D366FB5D8C5 for ; Fri, 13 May 2011 23:28:58 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 77551-01 for ; Sat, 14 May 2011 02:28:51 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-gy0-f174.google.com (mail-gy0-f174.google.com [209.85.160.174]) by mail.postgresql.org (Postfix) with ESMTP id 93D93B5D8B2 for ; Fri, 13 May 2011 23:28:51 -0300 (ADT) Received: by gyd10 with SMTP id 10so1077867gyd.19 for ; Fri, 13 May 2011 19:28:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=8jjNBgmtXVjNLFVr+2zs79ZMrn5VfLseKUhtLagaPzU=; b=hvr3wBtM6QtJiDUH5r2cnPGbZpndAI+AnRWCvWoPNyButuQKXx15cou+JmyNeh1OwV UnnemEgOlDO6r86mpEqPiqm83v4qdhlXquApFhg6dcTrMPLLD9ZFil6sttdA6iJGRwiL JvMg603iChKzqURF/fTKxOqXDNyDxuD6VzzXs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=TAZhYyClz2iL8FW+x/TR3GjpulaWDMIY9tB7pJXKfdxgIJEXIkOnH8DGL3d65qcmd4 cRj0NXyjpiOp3qzXqnM987AxbmA6GkM27uTIvAPw3GQ4o3heShOYWMjXydO5Jg5ghzGd 4SXnsS2jVe6cDHcznK9Gn0J0c3hutke8YSo0Y= MIME-Version: 1.0 Received: by 10.236.89.20 with SMTP id b20mr2245238yhf.148.1305340131224; Fri, 13 May 2011 19:28:51 -0700 (PDT) Received: by 10.236.103.11 with HTTP; Fri, 13 May 2011 19:28:51 -0700 (PDT) In-Reply-To: References: <1304245432864-4362578.post@n5.nabble.com> Date: Fri, 13 May 2011 22:28:51 -0400 Message-ID: Subject: Re: Query improvement From: Robert Haas To: Claudio Freire Cc: Mark , pgsql-performance@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.898 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RFC_ABUSE_POST=0.001 X-Spam-Level: X-Archive-Number: 201105/217 X-Sequence-Number: 43726 On Mon, May 2, 2011 at 3:58 AM, Claudio Freire wrote: > Hash joins are very inefficient if they require big temporary files. Hmm, that's not been my experience. What have you seen? I've seen a 64-batch hash join beat out a nested-loop-with-inner-indexscan, which I never woulda believed, but... -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company