Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 303951337C9D for ; Fri, 14 Jan 2011 12:02:39 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 71101-01-2 for ; Fri, 14 Jan 2011 16:02:31 +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 9BEC413384D8 for ; Fri, 14 Jan 2011 11:49:32 -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 p0EFnWF6010719; Fri, 14 Jan 2011 17:49:32 +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 p0EFnVnf010718; Fri, 14 Jan 2011 17:49:31 +0200 (EET) (envelope-from achill@matrix.gatewaynet.com) From: Achilleas Mantzios Organization: Dynacom Tankers Mgmt To: 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:49:31 +0200 Cc: "Kevin Grittner" Content-Type: text/plain; charset="iso-8859-7" Content-Transfer-Encoding: quoted-printable Message-Id: <201101141749.31711.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/84 X-Sequence-Number: 36524 =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