Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id CDB4064FCD5 for ; Sat, 9 Aug 2008 18:37:10 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 43647-06 for ; Sat, 9 Aug 2008 18:37:04 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by postgresql.org (Postfix) with ESMTP id CA56764FCC2 for ; Sat, 9 Aug 2008 18:37:07 -0300 (ADT) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KRw7V-0001Cv-1r for pgsql-performance@postgresql.org; Sat, 09 Aug 2008 21:37:05 +0000 Received: from apn-77-112-108-137.gprs.plus.pl ([77.112.108.137]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 09 Aug 2008 21:37:05 +0000 Received: from public by apn-77-112-108-137.gprs.plus.pl with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 09 Aug 2008 21:37:05 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-performance@postgresql.org From: Miernik Subject: Re: why query plan for the inner SELECT of WHERE x IN is wrong, but when run the inner query alone is OK? Date: Sat, 9 Aug 2008 23:36:35 +0200 Lines: 14 Message-ID: <20080809213635.7270.0.NOFFLE@turbacz.local> References: <20080809203435.7227.0.NOFFLE@turbacz.local> <11224.1218315478@sss.pgh.pa.us> <20080809211932.7252.0.NOFFLE@turbacz.local> Reply-To: Miernik X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: apn-77-112-108-137.gprs.plus.pl X-Archive: encrypt=none User-Agent: tin/1.9.3-20080506 ("Dalintober") (UNIX) (Linux/2.6.25-2-686 (i686)) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200808/89 X-Sequence-Number: 30970 Miernik wrote: > How can I bring it back to working? Like un-run ANALYZE on that table or > something? All was running reasonably well before I changed from > autovacuum to running ANALYZE manually, and I thought I would improve > performance... ;( I now removed all manual ANALYZE commands from the scripts, set enable_hashjoin = on enable_mergejoin = on and set on autovacuum, but it didn't bring back the performance of that query :( -- Miernik http://miernik.name/