Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 9497FB5D91F for ; Fri, 13 May 2011 16:20:47 -0300 (ADT) 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 42288-05 for ; Fri, 13 May 2011 19:20:41 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id BAD0BB5D802 for ; Fri, 13 May 2011 16:20:40 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p4DJKbUa002824; Fri, 13 May 2011 15:20:37 -0400 (EDT) To: Robert Haas cc: Merlin Moncure , Kevin Grittner , Sok Ann Yap , pgsql-performance@postgresql.org Subject: Re: reducing random_page_cost from 4 to 2 to force index scan In-reply-to: References: <4DB6F4BB020000250003CEB9@gw.wicourts.gov> Comments: In-reply-to Robert Haas message dated "Fri, 13 May 2011 13:44:24 -0400" Date: Fri, 13 May 2011 15:20:37 -0400 Message-ID: <2823.1305314437@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201105/211 X-Sequence-Number: 43720 Robert Haas writes: > On Tue, Apr 26, 2011 at 9:04 PM, Merlin Moncure wrote: >> The very first thing to check is effective_cache_size and to set it to >> a reasonable value. > Actually, effective_cache_size has no impact on costing except when > planning a nested loop with inner index scan. So, a query against a > single table can never benefit from changing that setting. That's flat out wrong. It does affect the cost estimate for plain indexscan (and bitmap indexscan) plans. regards, tom lane