Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 327001337C29 for ; Fri, 14 Jan 2011 11:57:17 -0400 (AST) 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 74876-02-7 for ; Fri, 14 Jan 2011 15:57:10 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smadev.internal.net (host3.dynacom.ondsl.gr [62.103.35.211]) by mail.postgresql.org (Postfix) with ESMTP id 067311337C61 for ; Fri, 14 Jan 2011 11:27:07 -0400 (AST) Received: from smadev.internal.net (localhost.internal.net [127.0.0.1]) by smadev.internal.net (8.14.2/8.14.2) with ESMTP id p0EFR52J010458; Fri, 14 Jan 2011 17:27:07 +0200 (EET) (envelope-from achill@matrix.gatewaynet.com) Received: from localhost (localhost [[UNIX: localhost]]) by smadev.internal.net (8.14.2/8.14.2/Submit) id p0EFQo68010455; Fri, 14 Jan 2011 17:26:50 +0200 (EET) (envelope-from achill@matrix.gatewaynet.com) From: Achilleas Mantzios Organization: Dynacom Tankers Mgmt To: "Kevin Grittner" , pgsql-admin@postgresql.org Subject: Re: Postgresql 9.0.2 explain analyze very slow (10x), compared to actual query time User-Agent: KMail/1.9.7 References: <201101111753.22602.achill@matrix.gatewaynet.com> <201101141553.38236.achill@matrix.gatewaynet.com> <4D300C2E0200002500039569@gw.wicourts.gov> In-Reply-To: <4D300C2E0200002500039569@gw.wicourts.gov> MIME-Version: 1.0 Content-Disposition: inline Date: Fri, 14 Jan 2011 17:26:50 +0200 Content-Type: text/plain; charset="iso-8859-7" Content-Transfer-Encoding: quoted-printable Message-Id: <201101141726.50587.achill@matrix.gatewaynet.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.451 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_BRBL_LASTEXT=1.449 X-Spam-Level: X-Archive-Number: 201101/83 X-Sequence-Number: 36523 =D3=F4=E9=F2 Friday 14 January 2011 16:41:18 =E3=F1=DC=F8=E1=F4=E5: > Achilleas Mantzios wrote: > =20 > > and NOT EXISTS=20 > > (SELECT distinct mold.id from marinerstates > =20 > Does that do better if you leave out the DISTINCT keyword? Maybe > use * instead of the column name? Its already really fast, it doesn't matter. Anyways just tried without the = distinct=20 =2E..NOT EXISTS (SELECT 1 from ... and its the same speed. The other form (NOT IN) is the problem. > =20 > -Kevin >=20 =2D-=20 Achilleas Mantzios