X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9B8D152800 for ; Fri, 1 Jul 2005 23:08:37 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 59482-03 for ; Sat, 2 Jul 2005 02:08:28 +0000 (GMT) Received: from gp.word-to-the-wise.com (gp.word-to-the-wise.com [64.71.176.18]) by svr1.postgresql.org (Postfix) with ESMTP id 595D952801 for ; Fri, 1 Jul 2005 23:08:25 -0300 (ADT) Received: by gp.word-to-the-wise.com (Postfix, from userid 500) id 34B778FC08E; Fri, 1 Jul 2005 19:08:23 -0700 (PDT) Date: Fri, 1 Jul 2005 19:08:23 -0700 From: Steve Atkins To: pgsql-performance@postgresql.org Subject: Re: Planner constants for RAM resident databases Message-ID: <20050702020823.GA32264@gp.word-to-the-wise.com> References: <200507012159.39041.emil@baymountain.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200507012159.39041.emil@baymountain.com> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.84 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_POST X-Spam-Level: X-Archive-Number: 200507/9 X-Sequence-Number: 13250 On Fri, Jul 01, 2005 at 09:59:38PM -0400, Emil Briggs wrote: > I'm working with an application where the database is entirely resident in RAM > (the server is a quad opteron with 16GBytes of memory). It's a web > application and handles a high volume of queries. The planner seems to be > generating poor plans for some of our queries which I can fix by raising > cpu_tuple_cost. I have seen some other comments in the archives saying that > this is a bad idea but is that necessarily the case when the database is > entirely resident in RAM? If I'm understanding correctly that'll mostly increase the estimated cost of handling a row relative to a sequential page fetch, which sure sounds like it'll push plans in the right direction, but it doesn't sound like the right knob to twiddle. What do you have random_page_cost set to? Cheers, Steve