Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id E58FDB5DCF1 for ; Wed, 26 Oct 2011 12:43:41 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 20654-02-8 for ; Wed, 26 Oct 2011 15:43:35 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 7C8ABB5DE03 for ; Wed, 26 Oct 2011 12:43:22 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p9QEjTWB012846; Wed, 26 Oct 2011 10:45:29 -0400 (EDT) To: "Jens Reufsteck" cc: pgsql-performance@postgresql.org Subject: Re: Anti join miscalculates row number? In-reply-to: <000d01cc93c9$5d3a8e90$17afabb0$@reufsteck@staufenbiel.de> References: <000d01cc93c9$5d3a8e90$17afabb0$@reufsteck@staufenbiel.de> Comments: In-reply-to "Jens Reufsteck" message dated "Wed, 26 Oct 2011 12:23:54 +0200" Date: Wed, 26 Oct 2011 10:45:29 -0400 Message-ID: <12845.1319640329@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201110/223 X-Sequence-Number: 45445 "Jens Reufsteck" writes: > I’ve got a lengthy query, that doesn't finish in reasonable time (i.e. > 10min+). I suspect, that the query optimizer miscalculates the number of > rows for part of the query. > ... > We're using postgres 9.0.4. Try 9.0.5. There was a bug fixed in this area. regards, tom lane