Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1ThrHF-0004xP-Tg for pgsql-performance@arkaria.postgresql.org; Mon, 10 Dec 2012 00:31:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1ThrHF-0007jO-Dg for pgsql-performance@arkaria.postgresql.org; Mon, 10 Dec 2012 00:31:21 +0000 Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TfxH4-0002vU-2R for pgsql-performance@postgresql.org; Tue, 04 Dec 2012 18:31:18 +0000 Received: from li188-192.members.linode.com ([178.79.132.192] helo=foo.me.uk) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TfxGy-0002S9-H1 for pgsql-performance@postgresql.org; Tue, 04 Dec 2012 18:31:17 +0000 Received: from webmail.cantabcapital.com ([212.44.17.222] helo=CCPPRT350008) by foo.me.uk with esmtpa (Exim 4.71) (envelope-from ) id 1TfxaP-0001J8-Ls; Tue, 04 Dec 2012 18:51:18 +0000 From: "Philip Scott" To: "'Claudio Freire'" , Cc: "'postgres performance list'" References: <092a01cdd230$ff6143c0$fe23cb40$@foo.me.uk> In-Reply-To: Date: Tue, 4 Dec 2012 18:31:05 -0000 Message-ID: <098101cdd24d$892524c0$9b6f6e40$@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+bBAG7NE8VmR/nQUA= 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 > The difference between cost estimation and actual cost of your queries, under relatively precise row estimates, seems to suggest your e_c_s or r_p_c aren't a reflection of your hardware's performance. Wow, so tweaking these has fixed it and then some. It now picks a slightly different plan than the 'fast' one previously: New super fast version with e_c_s 6GB->88Gb and r_p_c 2-> 1 (s_p_c 1->0.5): http://explain.depesz.com/s/ECk For reference: > Slow version with bitmapscan enabled: http://explain.depesz.com/s/6I7 > Fast version with bitmapscan disabled: http://explain.depesz.com/s/4MWG -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance