Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tgb0A-0003c9-AK for pgsql-performance@arkaria.postgresql.org; Thu, 06 Dec 2012 12:56:30 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1Tgb09-00082M-JO for pgsql-performance@arkaria.postgresql.org; Thu, 06 Dec 2012 12:56:29 +0000 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tgb08-00081Q-BC for pgsql-performance@postgresql.org; Thu, 06 Dec 2012 12:56:28 +0000 Received: from li188-192.members.linode.com ([178.79.132.192] helo=foo.me.uk) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tgb07-0006Ed-BJ for pgsql-performance@postgresql.org; Thu, 06 Dec 2012 12:56:27 +0000 Received: from webmail.cantabcapital.com ([212.44.17.222] helo=CCPPRT350008) by foo.me.uk with esmtpa (Exim 4.71) (envelope-from ) id 1TgbJa-0004c2-4U for pgsql-performance@postgresql.org; Thu, 06 Dec 2012 13:16:34 +0000 From: To: "'postgres performance list'" References: <092a01cdd230$ff6143c0$fe23cb40$@foo.me.uk> <096f01cdd247$722264a0$56672de0$@foo.me.uk> In-Reply-To: Date: Thu, 6 Dec 2012 12:56:26 -0000 Message-ID: <0b8b01cdd3b1$1a55b8b0$4f012a10$@foo.me.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQE7bKfasxp9xMk0I5yxURpgMQ+bBAG7NE8VAUNOjpICTD/jZgIPmBGyAk5PCg2Y40LE0A== Content-Language: en-gb X-SA-Exim-Connect-IP: 212.44.17.222 X-SA-Exim-Mail-From: pscott@foo.me.uk X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on foo.me.uk X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.1 Subject: Re: Slow query: bitmap scan troubles X-SA-Exim-Version: 4.2.1 (built Sat, 07 Nov 2009 20:03:47 +0000) X-SA-Exim-Scanned: Yes (on foo.me.uk) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org > I also wonder if increasing (say x10) of default_statistics_target or just doing ALTER TABLE SET STATISTICS for particular tables will help. > It will make planned to produce more precise estimations. Do not forget ANALYZE afer changing it. Thanks Sergey, I will try this too. I think the bother here is that this statistics are pretty good (we do analyse regularly and default_statistics_target is already 1000), but once I start filtering the two tables the correlations alter quite a bit. I don't think there is that much that can be done about that :) - Phil -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance