X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 54E5C9FA15C for ; Mon, 8 May 2006 21:08:16 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 30620-05 for ; Mon, 8 May 2006 21:08:09 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 5D7C99F9D82 for ; Mon, 8 May 2006 21:08:09 -0300 (ADT) Received: from mailhub2.une.edu.au (mailhub.une.edu.au [129.180.1.222]) by svr4.postgresql.org (Postfix) with ESMTP id 2C37B5B2050 for ; Tue, 9 May 2006 00:08:07 +0000 (GMT) Received: from icarus.une.edu.au (icarus.une.edu.au [129.180.47.120]) by mailhub2.une.edu.au (Postfix) with ESMTP id F33774520; Tue, 9 May 2006 10:07:56 +1000 (EST) Received: from kgb (unknown [129.180.47.225]) by icarus.une.edu.au (Postfix) with SMTP id A41013544DE; Tue, 9 May 2006 10:07:56 +1000 (EST) Date: Tue, 09 May 2006 10:10:19 +1000 From: Klint Gore To: Tom Lane Cc: Jim C.Nasby , pgsql-performance@postgresql.org, Jeffrey Tenny Subject: Re: performance question (something to do w/ parameterized In-Reply-To: <2731.1147131457@sss.pgh.pa.us> References: <445FD5B3.1010708@comcast.net> <2731.1147131457@sss.pgh.pa.us> Message-Id: <445FDDEB225.3451KG@129.180.47.120> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver 1.25.06 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/163 X-Sequence-Number: 18950 On Mon, 08 May 2006 19:37:37 -0400, Tom Lane wrote: > Jeffrey Tenny writes: > > The server was already running with random_page_cost=2 today for all tests, because of > > the mods I've made to improve other problem queries in the past (my settings noted below, and > > before in another msg on this topic). > > > So to nail this particular query something additional is required (even lower random_page_cost?). > > What's a good value for slower processors/memory and database in memory? > > If you're pretty sure the database will always be RAM-resident, then 1.0 > is the theoretically correct value. Would it be possible to craft a set of queries on specific data that could advise a reasonable value for random_page_cost? What sort of data distribution and query type would be heavily dependant on random_page_cost? i.e. randomness of the data, size of the data compared to physical memory. klint. +---------------------------------------+-----------------+ : Klint Gore : "Non rhyming : : EMail : kg@kgb.une.edu.au : slang - the : : Snail : A.B.R.I. : possibilities : : Mail University of New England : are useless" : : Armidale NSW 2351 Australia : L.J.J. : : Fax : +61 2 6772 5376 : : +---------------------------------------+-----------------+