Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 07211632DEC for ; Tue, 25 May 2010 21:24:33 -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 79040-04 for ; Wed, 26 May 2010 00:24:24 +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 8114E632C9D for ; Tue, 25 May 2010 21:24:25 -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 o4Q0ON4f002009; Tue, 25 May 2010 20:24:23 -0400 (EDT) To: David Jarvis cc: Kevin Grittner , pgsql-performance@postgresql.org Subject: Re: Random Page Cost and Planner In-reply-to: References: <4BFBD0890200002500031A6E@gw.wicourts.gov> Comments: In-reply-to David Jarvis message dated "Tue, 25 May 2010 16:26:52 -0700" Date: Tue, 25 May 2010 20:24:23 -0400 Message-ID: <2008.1274833463@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: 201005/188 X-Sequence-Number: 38772 David Jarvis writes: >> It sounds as though the active portion of your database is pretty >> much cached in RAM. True? > I would not have thought so; there are seven tables, each with 39 to 43 > million rows as: [ perhaps 64 bytes per row ] > The machine has 4GB of RAM, donated to PG as follows: Well, the thing you need to be *really* wary of is setting the cost parameters to make isolated tests look good. When you repeat a particular test case multiple times, all times after the first probably are fully cached ... but if your DB doesn't actually fit in RAM, that might not be too representative of what will happen under load. So if you want to cut the xxx_page_cost settings some more, pay close attention to what happens to average response time. regards, tom lane